mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 06:31:20 -04:00
attempt to use a cache for user-defined avatars. Should reduce memory footprint. to be tested
This commit is contained in:
parent
807bbedd5a
commit
e66fb923fb
25 changed files with 163 additions and 113 deletions
|
@ -322,8 +322,8 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
|||
|
||||
QPixmap pixmap ;
|
||||
|
||||
if(idd.mAvatar.mSize == 0 || !pixmap.loadFromData(idd.mAvatar.mData, idd.mAvatar.mSize, "PNG"))
|
||||
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(*it)) ;
|
||||
if(idd.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idd.mAvatar.mData, idd.mAvatar.mSize, pixmap))
|
||||
pixmap = GxsIdDetails::makeDefaultIcon(*it) ;
|
||||
|
||||
QAction *action = mnu->addAction(QIcon(pixmap), QString("%1 (%2)").arg(QString::fromUtf8(idd.mNickname.c_str()), QString::fromStdString((*it).toStdString())), this, SLOT(subscribeChatLobbyAs()));
|
||||
action->setData(QString::fromStdString((*it).toStdString())) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue