mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04: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
|
@ -34,6 +34,7 @@
|
|||
#include <retroshare/rsplugin.h>
|
||||
|
||||
#include <gui/settings/rsharesettings.h>
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <gui/statistics/TurtleRouterStatistics.h>
|
||||
#include <gui/statistics/GlobalRouterStatistics.h>
|
||||
|
@ -140,22 +141,22 @@ void StatisticsWindow::initStackedPage()
|
|||
QAction *action;
|
||||
|
||||
ui->stackPages->add(bwdlg = new BwCtrlWindow(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_BWGRAPH), tr("Bandwidth"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_BWGRAPH), tr("Bandwidth"), grp));
|
||||
|
||||
ui->stackPages->add(trsdlg = new TurtleRouterStatistics(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_TURTLE), tr("Turtle Router"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_TURTLE), tr("Turtle Router"), grp));
|
||||
|
||||
ui->stackPages->add(gxsiddlg = new GxsIdStatistics(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_IDENTITIES), tr("Identities"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_IDENTITIES), tr("Identities"), grp));
|
||||
|
||||
ui->stackPages->add(grsdlg = new GlobalRouterStatistics(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_GLOBALROUTER), tr("Global Router"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GLOBALROUTER), tr("Global Router"), grp));
|
||||
|
||||
ui->stackPages->add(gxsdlg = new GxsTransportStatistics(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_GXSTRANSPORT), tr("Gxs Transport"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GXSTRANSPORT), tr("Gxs Transport"), grp));
|
||||
|
||||
ui->stackPages->add(rttdlg = new RttStatistics(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_RTT), tr("RTT Statistics"), grp));
|
||||
|
||||
bool showdht = true;
|
||||
RsPeerDetails detail;
|
||||
|
@ -167,7 +168,7 @@ void StatisticsWindow::initStackedPage()
|
|||
if(showdht)
|
||||
{
|
||||
ui->stackPages->add(dhtw = new DhtWindow(ui->stackPages),
|
||||
action = createPageAction(QIcon(IMAGE_DHT), tr("DHT"), grp));
|
||||
action = createPageAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DHT), tr("DHT"), grp));
|
||||
}
|
||||
|
||||
/*std::cerr << "Looking for interfaces in existing plugins:" << std::endl;
|
||||
|
@ -180,7 +181,7 @@ void StatisticsWindow::initStackedPage()
|
|||
if(rsPlugins->plugin(i)->qt_icon() != NULL)
|
||||
icon = *rsPlugins->plugin(i)->qt_icon() ;
|
||||
else
|
||||
icon = QIcon(":images/extension_48.png") ;
|
||||
icon = FilesDefs::getIconFromQtResourcePath(":images/extension_48.png") ;
|
||||
|
||||
std::cerr << " Addign widget page for plugin " << rsPlugins->plugin(i)->getPluginName() << std::endl;
|
||||
MainPage *pluginPage = rsPlugins->plugin(i)->qt_page();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue