Avoid duplicate entries in QGenericUnixTheme::themeNames()
Change-Id: I6dc258274dc6614f56f306c30c95fe20c14fdf89 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
09d0f2d447
commit
46d302854e
@ -427,9 +427,9 @@ QStringList QGenericUnixTheme::themeNames()
|
||||
} else if (QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment() == QByteArray("GNOME")) {
|
||||
result.push_back(QLatin1String(QGnomeTheme::name));
|
||||
}
|
||||
const QByteArray session = qgetenv("DESKTOP_SESSION");
|
||||
if (!session.isEmpty() && session != "default")
|
||||
result.push_back(QString::fromLocal8Bit(session));
|
||||
const QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION"));
|
||||
if (!session.isEmpty() && session != QStringLiteral("default") && !result.contains(session))
|
||||
result.push_back(session);
|
||||
} // desktopSettingsAware
|
||||
if (result.isEmpty())
|
||||
result.push_back(QLatin1String(QGenericUnixTheme::name));
|
||||
|
Loading…
Reference in New Issue
Block a user