r20189 by craig - #13157: Fix extra includes of old util_icon, and move pixmap cache to class from icon loader function

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 22 05:13:56 UTC 2015


Author: craig
Date: Mon Jun 22 05:13:56 2015
New Revision: 20189

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20189
Log:
#13157: Fix extra includes of old util_icon, and move pixmap cache to class from icon loader function

Modified:
    trunk/Scribus/scribus/designer/smwidgets/CMakeLists.txt
    trunk/Scribus/scribus/iconmanager.cpp
    trunk/Scribus/scribus/iconmanager.h
    trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp
    trunk/Scribus/scribus/plugins/import/ps/importps.cpp
    trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
    trunk/Scribus/scribus/ui/AdapterWidget.cpp

Modified: trunk/Scribus/scribus/designer/smwidgets/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/designer/smwidgets/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/designer/smwidgets/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/designer/smwidgets/CMakeLists.txt Mon Jun 22 05:13:56 2015
@@ -6,7 +6,7 @@
 smalignselectplugin.h
 ../../smalignselect.h
 ../../alignselect.h
-../../util_icon.h
+../../iconmanager.h
 ../../scpaths.h
 ../../prefsmanager.h
 ../../commonstrings.h
@@ -17,7 +17,7 @@
 smalignselectplugin.cpp
 ../../smalignselect.cpp
 ../../alignselect.cpp
-../../util_icon.cpp
+../../iconmanager.cpp
 ../../scpaths.cpp
 ../../prefsmanager.cpp
 ../../commonstrings.cpp

Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp (original)
+++ trunk/Scribus/scribus/iconmanager.cpp Mon Jun 22 05:13:56 2015
@@ -23,7 +23,6 @@
 #include "iconmanager.h"
 #include "prefsmanager.h"
 #include "scpaths.h"
-#include "scpixmapcache.h"
 
 IconManager* IconManager::_instance = 0;
 
@@ -158,7 +157,6 @@
 
 QPixmap IconManager::loadPixmap(const QString nam, bool forceUseColor)
 {
-	static ScPixmapCache<QString> pxCache;
 	if (pxCache.contains(nam))
 		return *pxCache[nam];
 

Modified: trunk/Scribus/scribus/iconmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/iconmanager.h
==============================================================================
--- trunk/Scribus/scribus/iconmanager.h (original)
+++ trunk/Scribus/scribus/iconmanager.h Mon Jun 22 05:13:56 2015
@@ -21,6 +21,7 @@
 
 #include "prefsstructs.h"
 #include "scribusapi.h"
+#include "scpixmapcache.h"
 
 class PrefsFile;
 class ScribusMainWindow;
@@ -66,6 +67,7 @@
 	*/
 	static IconManager* _instance;
 	QMap<QString, ScIconSetData> m_iconSets;
+	ScPixmapCache<QString> pxCache;
 
 	bool initIcons();
 	void readIconConfigFiles();

Modified: trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp Mon Jun 22 05:13:56 2015
@@ -53,7 +53,6 @@
 #include "undomanager.h"
 #include "util.h"
 #include "util_formats.h"
-#include "util_icon.h"
 #include "util_math.h"
 
 

Modified: trunk/Scribus/scribus/plugins/import/ps/importps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/plugins/import/ps/importps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/importps.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ps/importps.cpp Mon Jun 22 05:13:56 2015
@@ -45,7 +45,6 @@
 #include "util.h"
 #include "util_color.h"
 #include "util_formats.h"
-#include "util_icon.h"
 #include "util_math.h"
 
 #ifdef HAVE_PODOFO

Modified: trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp Mon Jun 22 05:13:56 2015
@@ -16,7 +16,7 @@
 #include <QAction>
 #include <QPainter>
 
-#include "util_icon.h"
+#include "iconmanager.h"
 
 
 nftdialog::nftdialog(QWidget* parent, QString lang, QString templateDir) : QDialog(parent)
@@ -26,7 +26,7 @@
 
 	settings = new nftsettings(lang, templateDir);
 
-	setWindowIcon(loadIcon("AppIcon.png"));
+	setWindowIcon(IconManager::instance->loadIcon("AppIcon.png"));
 	
 	// context menu
 	removeAction = new QAction(tr("&Remove"), tnailGrid);
@@ -36,9 +36,9 @@
 
 	setupAbout();
 	
-	toolBox->setItemIcon(0, loadIcon("16/information.png"));
-	toolBox->setItemIcon(1, loadIcon("16/image-x-generic.png"));
-	toolBox->setItemIcon(2, loadIcon("16/help-browser.png"));
+	toolBox->setItemIcon(0, IconManager::instance->loadIcon("16/information.png"));
+	toolBox->setItemIcon(1, IconManager::instance->loadIcon("16/image-x-generic.png"));
+	toolBox->setItemIcon(2, IconManager::instance->loadIcon("16/help-browser.png"));
 	tnailGrid->setIconSize(QSize(60, 60));
 	
 	// Signals and Slots Connections

Modified: trunk/Scribus/scribus/ui/AdapterWidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20189&path=/trunk/Scribus/scribus/ui/AdapterWidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/AdapterWidget.cpp (original)
+++ trunk/Scribus/scribus/ui/AdapterWidget.cpp Mon Jun 22 05:13:56 2015
@@ -30,7 +30,7 @@
 #include <cstdlib>
 #include <cassert>
 #include <string>
-#include "util_icon.h"
+#include "iconmanager.h"
 #include "AdapterWidget.h"
 
 AdapterWidget::AdapterWidget ( QWidget * parent, const char * name, const QGLWidget * shareWidget) : QGLWidget ( parent, shareWidget)
@@ -69,7 +69,7 @@
 			button = 2;
 			break;
 		case Qt::RightButton:
-			qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")));
+			qApp->setOverrideCursor(IconManager::instance()->loadIcon("LupeZ.xpm"));
 			button = 3;
 			break;
 		case Qt::NoButton:




More information about the scribus-commit mailing list