summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2013-04-22 19:20:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-24 19:45:26 +0200
commit55145c52677e961804b7b3a725652bd5ce1e0269 (patch)
tree44d0b6f39dc4ab0ecd05f88bbe94f2cd74b3e4d7 /src/gui
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 <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformservices.cpp5
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
+ * XDG_CURRENT_DESKTOP.
*/
QByteArray QPlatformServices::desktopEnvironment() const
{