From fbeaeee7e7b5bad24df011c1d9d9674a4656bbde Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Wed, 24 Jul 2024 19:26:38 +0100 Subject: [PATCH] Remove xpmMap from BitmapFactory No longer used since: 6ca8b2daae ("update hardcoded XPMs to .svg files. Updated .svg icons for clarity.", 2024-03-23) --- src/Gui/BitmapFactory.cpp | 15 +-------------- src/Gui/BitmapFactory.h | 2 -- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/Gui/BitmapFactory.cpp b/src/Gui/BitmapFactory.cpp index c698f6231d..cd15e58630 100644 --- a/src/Gui/BitmapFactory.cpp +++ b/src/Gui/BitmapFactory.cpp @@ -52,7 +52,6 @@ namespace Gui { class BitmapFactoryInstP { public: - QMap xpmMap; QMap xpmCache; bool useIconTheme; @@ -164,11 +163,6 @@ QStringList BitmapFactoryInst::findIconFiles() const return files; } -void BitmapFactoryInst::addXPM(const char* name, const char** pXPM) -{ - d->xpmMap[name] = pXPM; -} - void BitmapFactoryInst::addPixmapToCache(const char* name, const QPixmap& icon) { d->xpmCache[name] = icon; @@ -247,16 +241,11 @@ QPixmap BitmapFactoryInst::pixmap(const char* name) const if (it != d->xpmCache.end()) return it.value(); - // now try to find it in the built-in XPM QPixmap icon; - QMap::Iterator It = d->xpmMap.find(name); - if (It != d->xpmMap.end()) - icon = QPixmap(It.value()); // Try whether an absolute path is given QString fn = QString::fromUtf8(name); - if (icon.isNull()) - loadPixmap(fn, icon); + loadPixmap(fn, icon); // try to find it in the 'icons' search paths if (icon.isNull()) { @@ -364,8 +353,6 @@ QPixmap BitmapFactoryInst::pixmapFromSvg(const QByteArray& originalContents, con QStringList BitmapFactoryInst::pixmapNames() const { QStringList names; - for (QMap::Iterator It = d->xpmMap.begin(); It != d->xpmMap.end(); ++It) - names << QString::fromUtf8(It.key().c_str()); for (QMap::Iterator It = d->xpmCache.begin(); It != d->xpmCache.end(); ++It) { QString item = QString::fromUtf8(It.key().c_str()); if (!names.contains(item)) diff --git a/src/Gui/BitmapFactory.h b/src/Gui/BitmapFactory.h index 58cfc73720..23288589af 100644 --- a/src/Gui/BitmapFactory.h +++ b/src/Gui/BitmapFactory.h @@ -66,8 +66,6 @@ public: /// Returns the absolute file names of icons found in the given search paths QStringList findIconFiles() const; /// Adds a build in XPM pixmap under a given name - void addXPM(const char* name, const char** pXPM); - /// Adds a build in XPM pixmap under a given name void addPixmapToCache(const char* name, const QPixmap& icon); /// Checks whether the pixmap is already registered. bool findPixmapInCache(const char* name, QPixmap& icon) const;