path: root/src/gui/kernel
diff options
authorDavid Faure <>2013-04-22 19:20:19 +0200
committerThe Qt Project <>2013-04-24 19:45:26 +0200
commit55145c52677e961804b7b3a725652bd5ce1e0269 (patch)
tree44d0b6f39dc4ab0ecd05f88bbe94f2cd74b3e4d7 /src/gui/kernel
parent9e035d9de2d1c775dd02eca2df5d8ebf5aca41ad (diff)
Improve desktop environment detection.
UNKNOWN now means generic unix theme, rather than Gtk: there are other KDE/Qt-based desktops, and there's also the case of no desktop at all (e.g. bare Xvfb, as used by automated builds). To make this correct for GTK-based desktops, this commits improves the detection of the current desktop environment. Change-Id: Ib696624de39d5024527880df7adc26c65b838d15 Reviewed-by: J-P Nurmi <> Reviewed-by: Friedemann Kleint <> Reviewed-by: Jens Bache-Wiig <> Reviewed-by: Shawn Rutledge <>
Diffstat (limited to 'src/gui/kernel')
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformservices.cpp b/src/gui/kernel/qplatformservices.cpp
index f2cade0a35..d09b74c6fe 100644
--- a/src/gui/kernel/qplatformservices.cpp
+++ b/src/gui/kernel/qplatformservices.cpp
@@ -74,7 +74,10 @@ bool QPlatformServices::openDocument(const QUrl &url)
* \brief QPlatformServices::desktopEnvironment returns the active desktop environment.
- * On Unix this function returns KDE, GNOME or UNKNOWN.
+ * On Unix this function returns the uppercase desktop environment name, such as
+ * KDE, GNOME, UNITY, XFCE, LXDE etc. or UNKNOWN if none was detected.
+ * The primary way to detect the desktop environment is the environment variable
QByteArray QPlatformServices::desktopEnvironment() const