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>
This commit is contained in:
parent
4dfaa1d60a
commit
d268b91907
@ -79,6 +79,9 @@ QIconLoader::QIconLoader() :
|
|||||||
|
|
||||||
static inline QString systemThemeName()
|
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()) {
|
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
|
||||||
const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName);
|
const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconThemeName);
|
||||||
if (themeHint.isValid())
|
if (themeHint.isValid())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user