summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-11-19 12:42:10 +0100
committerLiang Qi <liang.qi@qt.io>2018-11-19 12:42:10 +0100
commit4d180586cddbd71a67c83246db3bec1caa595e05 (patch)
tree0970def686b4e28e9cf6a3f0fc897e05bb0a9fbc /src/corelib/global
parent6b088b7a1da37511a8abb1503e4f2f95632dbdac (diff)
parent527406cbd99f44470ef87468b73c18df949e8ac7 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp14
2 files changed, 10 insertions, 6 deletions
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index 224d162fb0..f86cbaf74d 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -127,11 +127,13 @@
#define QT_FEATURE_commandlineparser -1
#define QT_NO_COMPRESS
#define QT_JSON_READONLY
+#define QT_FEATURE_settings 1
#define QT_NO_STANDARDPATHS
#define QT_FEATURE_textcodec -1
#else
#define QT_FEATURE_codecs -1
#define QT_FEATURE_commandlineparser 1
+#define QT_FEATURE_settings -1
#define QT_FEATURE_textcodec 1
#endif
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index e727f00c8e..4119012d85 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -41,7 +41,9 @@
#include "qdir.h"
#include "qstringlist.h"
#include "qfile.h"
+#if QT_CONFIG(settings)
#include "qsettings.h"
+#endif
#include "qlibraryinfo.h"
#include "qscopedpointer.h"
@@ -67,7 +69,7 @@ QT_BEGIN_NAMESPACE
extern void qDumpCPUFeatures(); // in qsimd.cpp
-#ifndef QT_NO_SETTINGS
+#if QT_CONFIG(settings)
struct QLibrarySettings
{
@@ -204,7 +206,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
return 0; //no luck
}
-#endif // QT_NO_SETTINGS
+#endif // settings
/*!
\class QLibraryInfo
@@ -464,7 +466,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
#endif // QT_BUILD_QMAKE, started inside location !
QString ret;
bool fromConf = false;
-#ifndef QT_NO_SETTINGS
+#if QT_CONFIG(settings)
#ifdef QT_BUILD_QMAKE
// Logic for choosing the right data source: if EffectivePaths are requested
// and qt.conf with that section is present, use it, otherwise fall back to
@@ -547,7 +549,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
ret = QDir::fromNativeSeparators(ret);
}
}
-#endif // QT_NO_SETTINGS
+#endif // settings
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
if (!fromConf) {
@@ -646,7 +648,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
{
-#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(settings)
QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());
if (!settings.isNull()) {
const QString key = QLatin1String(platformsSection)
@@ -657,7 +659,7 @@ QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
}
#else
Q_UNUSED(platformName);
-#endif // !QT_BUILD_QMAKE && !QT_NO_SETTINGS
+#endif // !QT_BUILD_QMAKE && settings
return QStringList();
}