summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/services/genericunix
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/services/genericunix')
-rw-r--r--src/platformsupport/services/genericunix/qgenericunixservices.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
index 168ecf82e4..6639f904b3 100644
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
@@ -54,10 +54,10 @@ enum { debug = 0 };
static inline QByteArray detectDesktopEnvironment()
{
- if (!qgetenv("KDE_FULL_SESSION").isEmpty())
+ if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION"))
return QByteArray("KDE");
// GNOME_DESKTOP_SESSION_ID is deprecated for some reason, but still check it
- if (qgetenv("DESKTOP_SESSION") == "gnome" || !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty())
+ if (qgetenv("DESKTOP_SESSION") == "gnome" || !qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID"))
return QByteArray("GNOME");
return QByteArray("UNKNOWN");
}