mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 10:05:19 -04:00
First shot of file sharing permissions. Compiles, but needs some testing/debugging.
- added type-safe flags in retroshare/rsflags.h. This should be used to make new flags types in order to prevent mixing flags up in function prototypes. - group handling is left to rsPeers. We'll move it to rsCircles later. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5754 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
03d4936b12
commit
dc82cee700
27 changed files with 567 additions and 336 deletions
|
@ -204,12 +204,12 @@ int FlatStyle_RDM::columnCount(const QModelIndex &/*parent*/) const
|
|||
}
|
||||
QString RetroshareDirModel::getFlagsString(uint32_t flags)
|
||||
{
|
||||
char str[5] = "----" ;
|
||||
char str[8] = "- - - -" ;
|
||||
|
||||
if(flags & DIR_FLAGS_BROWSABLE_GROUPS) str[0] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) str[1] = 'N' ;
|
||||
if(flags & DIR_FLAGS_BROWSABLE_OTHERS) str[2] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) str[3] = 'N' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) str[2] = 'N' ;
|
||||
if(flags & DIR_FLAGS_BROWSABLE_OTHERS) str[4] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) str[6] = 'N' ;
|
||||
|
||||
return QString(str) ;
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
|||
// return ind;
|
||||
// }
|
||||
case 4:
|
||||
return getGroupsString(details.groups) ;
|
||||
return getGroupsString(details.parent_groups) ;
|
||||
|
||||
default:
|
||||
return tr("FILE");
|
||||
|
@ -364,7 +364,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
|||
case 3:
|
||||
return getFlagsString(details.flags);
|
||||
case 4:
|
||||
return getGroupsString(details.groups) ;
|
||||
return getGroupsString(details.parent_groups) ;
|
||||
|
||||
default:
|
||||
return tr("DIR");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue