summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/services/genericunix
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-11-12 09:40:47 +0100
committerLiang Qi <liang.qi@qt.io>2018-11-15 17:20:15 +0000
commit527406cbd99f44470ef87468b73c18df949e8ac7 (patch)
tree4ee73cffee4bf8699ce45d902aa9b30c6ebb1cc4 /src/platformsupport/services/genericunix
parentcd201b2c2c2849fea0c5a38ffd979cd9d5b24997 (diff)
Modernize the "settings" feature
Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/platformsupport/services/genericunix')
-rw-r--r--src/platformsupport/services/genericunix/qgenericunixservices.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
index cb1e367b9f..e63eb3b5b2 100644
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
@@ -45,7 +45,9 @@
#if QT_CONFIG(process)
# include <QtCore/QProcess>
#endif
+#if QT_CONFIG(settings)
#include <QtCore/QSettings>
+#endif
#include <QtCore/QStandardPaths>
#include <QtCore/QUrl>
@@ -93,7 +95,7 @@ static inline QByteArray detectDesktopEnvironment()
// This can be a path in /usr/share/xsessions
int slash = desktopSession.lastIndexOf('/');
if (slash != -1) {
-#ifndef QT_NO_SETTINGS
+#if QT_CONFIG(settings)
QSettings desktopFile(QFile::decodeName(desktopSession + ".desktop"), QSettings::IniFormat);
desktopFile.beginGroup(QStringLiteral("Desktop Entry"));
QByteArray desktopName = desktopFile.value(QStringLiteral("DesktopNames")).toByteArray();