Provide "kde" in the themeNames

KDE would like to get its integration plugin on Wayland.
The name won't change for Wayland, so filtering it out
because it is the name of the X11 desktop environment is
wrong.

The patch follows the approach of the QGenericUnixTheme.

Change-Id: Ia9c253ae6b5d609bd3bc630ce5c36b89811b079a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
Martin Gräßlin 2014-02-06 13:40:50 +01:00 committed by Laszlo Agocs
parent ebe84dd5cc
commit 82669149b0

View File

@ -84,15 +84,18 @@ public:
if (QGuiApplication::desktopSettingsAware()) {
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
// Ignore X11 desktop environments
if (!desktopEnvironment.isEmpty() &&
if (desktopEnvironment == QByteArrayLiteral("KDE")) {
#ifndef QT_NO_SETTINGS
result.push_back(QStringLiteral("kde"));
#endif
} else if (!desktopEnvironment.isEmpty() &&
desktopEnvironment != QByteArrayLiteral("UNKNOWN") &&
desktopEnvironment != QByteArrayLiteral("KDE") &&
desktopEnvironment != QByteArrayLiteral("GNOME") &&
desktopEnvironment != QByteArrayLiteral("UNITY") &&
desktopEnvironment != QByteArrayLiteral("MATE") &&
desktopEnvironment != QByteArrayLiteral("XFCE") &&
desktopEnvironment != QByteArrayLiteral("LXDE"))
// Ignore X11 desktop environments
result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower()));
}