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

@ -20,6 +20,7 @@
* *
*******************************************************************************/
#include "gui/common/FilesDefs.h"
#include "ChatUserNotify.h"
#include "gui/notifyqt.h"
#include "gui/MainWindow.h"
@ -75,12 +76,12 @@ bool ChatUserNotify::hasSetting(QString *name, QString *group)
QIcon ChatUserNotify::getIcon()
{
return QIcon(":/images/chat.png");
return FilesDefs::getIconFromQtResourcePath(":/images/chat.png");
}
QIcon ChatUserNotify::getMainIcon(bool hasNew)
{
return hasNew ? QIcon(":/icons/png/network-notify.png") : QIcon(":/icons/png/network.png");
return hasNew ? FilesDefs::getIconFromQtResourcePath(":/icons/png/network-notify.png") : FilesDefs::getIconFromQtResourcePath(":/icons/png/network.png");
}
unsigned int ChatUserNotify::getNewCount()