diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-06-06 15:01:59 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-08 04:47:59 +0200 |
commit | 21e0d164110a4a1ff824e4014957353765542c2d (patch) | |
tree | 9972ad9d441e58cf959bfbd1d44bce657109594a /src/platformsupport/themes | |
parent | 168c583a783196181b7aa601d644459d7e0de92d (diff) |
Remove widgets lib dependency on platformsupport.
Instead of the dependency add the one needed function as virtual to
the QPlatformServices in QtGui.
Change-Id: Ia4455f5ac88ec4d0480bd81635cebba62bbd8ac5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/platformsupport/themes')
-rw-r--r-- | src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index 5c57b0c12f..d4826fb542 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -52,6 +52,9 @@ #include <QtCore/QSettings> #include <QtCore/QVariant> #include <QtCore/QStringList> +#include <private/qguiapplication_p.h> +#include <qpa/qplatformintegration.h> +#include <qpa/qplatformservices.h> QT_BEGIN_NAMESPACE @@ -378,15 +381,10 @@ QStringList QGenericUnixTheme::themeNames() { QStringList result; if (QGuiApplication::desktopSettingsAware()) { - switch (QGenericUnixServices::desktopEnvironment()) { - case QGenericUnixServices::DE_KDE: + if (QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment() == QByteArray("KDE")) { result.push_back(QLatin1String(QKdeTheme::name)); - break; - case QGenericUnixServices::DE_GNOME: + } else if (QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment() == QByteArray("GNOME")) { result.push_back(QLatin1String(QGnomeTheme::name)); - break; - case QGenericUnixServices::DE_UNKNOWN: - break; } const QByteArray session = qgetenv("DESKTOP_SESSION"); if (!session.isEmpty() && session != "default") |