Merge pull request #1935 from PhenomRetroShare/Fix_FriendsFilesFlatView

Fix FriendsFiles list when on FlatView
This commit is contained in:
csoler 2020-05-20 22:21:09 +02:00 committed by GitHub
commit cb44d42f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,12 +335,13 @@ QString RetroshareDirModel::getAgeIndicatorString(const DirDetails &details) con
const QIcon& RetroshareDirModel::getFlagsIcon(FileStorageFlags flags) const QIcon& RetroshareDirModel::getFlagsIcon(FileStorageFlags flags)
{ {
static QIcon *static_icons[8] = {NULL}; static QIcon *static_icons[8] = {NULL};
if(static_icons[0] == NULL)
static_icons[0] = new QIcon();
int n=0; int n=0;
if(flags & DIR_FLAGS_ANONYMOUS_DOWNLOAD) n += 1 ; if(flags & DIR_FLAGS_ANONYMOUS_DOWNLOAD) n += 1 ;
if(flags & DIR_FLAGS_ANONYMOUS_SEARCH ) n += 2 ; if(flags & DIR_FLAGS_ANONYMOUS_SEARCH ) n += 2 ;
if(flags & DIR_FLAGS_BROWSABLE ) n += 4 ; if(flags & DIR_FLAGS_BROWSABLE ) n += 4 ;
n-= 1;
if(static_icons[n] == NULL) if(static_icons[n] == NULL)
{ {