diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2017-05-11 13:06:07 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2017-05-15 09:05:54 +0000 |
commit | 8e880bb50f1417cef784011f468bc51e8453d6f0 (patch) | |
tree | 3013c49c3f5f64e776c238ec6b3cf97760f2fe46 /src/client/qwaylandwindowmanagerintegration.cpp | |
parent | bf2dec1e32fbd92ba431bf88dc989f209a15aa01 (diff) |
Remove duplicate code
This code started as a 1:1 copy from the base class in 5.8. Just call the base
class implementation, since this was also improved in the meantime.
Change-Id: Ib9c7c6efa3f043a83029b5387097533bf5da833e
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/client/qwaylandwindowmanagerintegration.cpp')
-rw-r--r-- | src/client/qwaylandwindowmanagerintegration.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/client/qwaylandwindowmanagerintegration.cpp b/src/client/qwaylandwindowmanagerintegration.cpp index 60825aec2..c519126e5 100644 --- a/src/client/qwaylandwindowmanagerintegration.cpp +++ b/src/client/qwaylandwindowmanagerintegration.cpp @@ -109,28 +109,6 @@ void QWaylandWindowManagerIntegration::windowmanager_quit() QGuiApplication::quit(); } -QByteArray QWaylandWindowManagerIntegration::desktopEnvironment() const -{ - const QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); - if (!xdgCurrentDesktop.isEmpty()) - return xdgCurrentDesktop.toUpper(); // KDE, GNOME, UNITY, LXDE, MATE, XFCE... - - // Classic fallbacks - if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION")) - return QByteArrayLiteral("KDE"); - if (!qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID")) - return QByteArrayLiteral("GNOME"); - - // Fallback to checking $DESKTOP_SESSION (unreliable) - const QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); - if (desktopSession == "gnome") - return QByteArrayLiteral("GNOME"); - if (desktopSession == "xfce") - return QByteArrayLiteral("XFCE"); - - return QByteArrayLiteral("UNKNOWN"); -} - void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url) { Q_ASSERT(isInitialized()); |