summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-05-29 11:25:14 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-03 18:17:51 +0200
commitd268b919071863d2a5287b64304e77ade07d55d3 (patch)
tree95726c7144832a45350c50c6c526e4225001ae95 /src/gui
parent4dfaa1d60a7a212f8364c1cd287f18b0b8848e36 (diff)
Add QT_QPA_SYSTEM_ICON_THEME to override icon theme name
On a plain X11 desktop, it otherwise ends up empty. Pick-to: 5.15 Task-number: QTBUG-25351 Task-number: QTBUG-25718 Task-number: QTBUG-74252 Change-Id: I50a522a3e1761e422d5949d5338869ceb9e5e89d Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qiconloader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 3fa3bb9c59..ac7a6864f8 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -79,6 +79,9 @@ QIconLoader::QIconLoader() :
static inline QString systemThemeName()
{
+ const auto override = qgetenv("QT_QPA_SYSTEM_ICON_THEME");
+ if (!override.isEmpty())
+ return QString::fromLocal8Bit(override);
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName);
if (themeHint.isValid())