mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 00:53:58 -05:00
converted all calls to QIcon("somefile.png") into FilesDefs::getIconFromQtResourcePath("somefile.png") to save memory duplicated by Qt
This commit is contained in:
parent
dcbcc95e41
commit
209355b9a5
63 changed files with 330 additions and 291 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <QTabBar>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "ChatTabWidget.h"
|
||||
#include "ui_ChatTabWidget.h"
|
||||
#include "ChatDialog.h"
|
||||
|
|
@ -102,9 +103,9 @@ void ChatTabWidget::tabInfoChanged(ChatDialog *dialog)
|
|||
if (tab >= 0) {
|
||||
if (dialog->isTyping()) {
|
||||
setBlinking(tab, false);
|
||||
setTabIcon(tab, QIcon(IMAGE_TYPING));
|
||||
setTabIcon(tab, FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING));
|
||||
} else if (dialog->hasNewMessages()) {
|
||||
setTabIcon(tab, QIcon(IMAGE_CHAT));
|
||||
setTabIcon(tab, FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT));
|
||||
if (dialog->notifyBlink()) {
|
||||
setBlinking(tab, true);
|
||||
} else {
|
||||
|
|
@ -148,9 +149,9 @@ void ChatTabWidget::getInfo(bool &isTyping, bool &hasNewMessage, QIcon *icon)
|
|||
|
||||
if (icon) {
|
||||
if (isTyping) {
|
||||
*icon = QIcon(IMAGE_TYPING);
|
||||
*icon = FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING);
|
||||
} else if (hasNewMessage) {
|
||||
*icon = QIcon(IMAGE_CHAT);
|
||||
*icon = FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT);
|
||||
} else {
|
||||
cd = dynamic_cast<ChatDialog*>(currentWidget());
|
||||
if (cd && cd->hasPeerStatus()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue