From 55145c52677e961804b7b3a725652bd5ce1e0269 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 22 Apr 2013 19:20:19 +0200 Subject: 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 --- src/gui/kernel/qplatformservices.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformservices.cpp') 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 { -- cgit v1.2.3