summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.cpp3
-rw-r--r--src/gui/image/qiconloader_p.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 40ba84bb14..cafc966fbb 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1170,7 +1170,8 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
icon = *qtIconCache()->object(name);
} else {
QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme();
- QIconEngine * const engine = platformTheme ? platformTheme->createIconEngine(name)
+ bool hasUserTheme = QIconLoader::instance()->hasUserTheme();
+ QIconEngine * const engine = (platformTheme && !hasUserTheme) ? platformTheme->createIconEngine(name)
: new QIconLoaderEngine(name);
QIcon *cachedIcon = new QIcon(engine);
icon = *cachedIcon;
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
index 38cf9c1736..5b0362e218 100644
--- a/src/gui/image/qiconloader_p.h
+++ b/src/gui/image/qiconloader_p.h
@@ -173,6 +173,7 @@ public:
void updateSystemTheme();
void invalidateKey() { m_themeKey++; }
void ensureInitialized();
+ bool hasUserTheme() const { return !m_userTheme.isEmpty(); }
private:
QThemeIconInfo findIconHelper(const QString &themeName,