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

@ -29,6 +29,7 @@
#include "util/HandleRichText.h"
#include "util/DateTime.h"
#include "gui/common/AvatarDefs.h"
#include "gui/common/FilesDefs.h"
#include "gui/notifyqt.h"
#include <retroshare/rsmsgs.h>
@ -231,7 +232,7 @@ void MsgItem::doExpand(bool open)
if (open)
{
expandFrame->show();
expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
expandButton->setToolTip(tr("Hide"));
mCloseOnRead = false;
@ -241,7 +242,7 @@ void MsgItem::doExpand(bool open)
else
{
expandFrame->hide();
expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
expandButton->setToolTip(tr("Expand"));
}