diff -urN qtbase-opensource-src-5.2.0~beta1-old/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp qtbase-opensource-src-5.2.0~beta1/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp --- qtbase-opensource-src-5.2.0~beta1-old/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp 2013-10-22 10:49:22.000000000 +0200 +++ qtbase-opensource-src-5.2.0~beta1/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp 2013-11-19 19:13:11.366024931 +0100 @@ -555,6 +555,9 @@ { QStringList result; if (QGuiApplication::desktopSettingsAware()) { + const QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION")); + if (!session.isEmpty() && session != QStringLiteral("default")) + result.push_back(session); const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); if (desktopEnvironment == QByteArrayLiteral("KDE")) { #ifndef QT_NO_SETTINGS @@ -570,9 +573,6 @@ // fallback to the generic Gnome theme if loading the GTK2 theme fails result.push_back(QLatin1String(QGnomeTheme::name)); } - 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));