converted all calls to QIcon("somefile.png") into FilesDefs::getIconFromQtResourcePath("somefile.png") to save memory duplicated by Qt

This commit is contained in:
csoler 2020-08-15 22:17:52 +02:00
parent dcbcc95e41
commit 209355b9a5
63 changed files with 330 additions and 291 deletions

View file

@ -23,6 +23,7 @@
#include "PopupChatDialog.h"
#include "PopupChatWindow.h"
#include "gui/common/FilesDefs.h"
#include "gui/settings/rsharesettings.h"
#include "gui/settings/RsharePeerSettings.h"
#include "gui/notifyqt.h"
@ -149,10 +150,10 @@ void PopupChatDialog::showAvatarFrame(bool show)
if (show) {
ui.avatarFrameButton->setToolTip(tr("Hide Avatar"));
ui.avatarFrameButton->setIcon(QIcon(":images/hide_toolbox_frame.png"));
ui.avatarFrameButton->setIcon(FilesDefs::getIconFromQtResourcePath(":images/hide_toolbox_frame.png"));
} else {
ui.avatarFrameButton->setToolTip(tr("Show Avatar"));
ui.avatarFrameButton->setIcon(QIcon(":images/show_toolbox_frame.png"));
ui.avatarFrameButton->setIcon(FilesDefs::getIconFromQtResourcePath(":images/show_toolbox_frame.png"));
}
PeerSettings->setShowAvatarFrame(mChatId, show);