attempt to use a cache for user-defined avatars. Should reduce memory footprint. to be tested

This commit is contained in:
csoler 2019-06-03 23:52:29 +02:00
parent 807bbedd5a
commit e66fb923fb
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
25 changed files with 163 additions and 113 deletions

View file

@ -20,6 +20,7 @@
#include <QBuffer>
#include "PostedGroupDialog.h"
#include "gui/gxs/GxsIdDetails.h"
#include <retroshare/rswiki.h>
#include <iostream>
@ -163,9 +164,9 @@ bool PostedGroupDialog::service_loadGroup(uint32_t token, Mode /*mode*/, RsGroup
if (group.mGroupImage.mData) {
QPixmap pixmap;
if (pixmap.loadFromData(group.mGroupImage.mData, group.mGroupImage.mSize, "PNG")) {
if (GxsIdDetails::loadPixmapFromData(group.mGroupImage.mData, group.mGroupImage.mSize, pixmap))
setLogo(pixmap);
}
} else {
setLogo(QPixmap(":/icons/png/posted.png"));
}