summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/CMakeLists.txt2
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h10
-rw-r--r--src/corelib/global/qconfig.cpp.in71
-rw-r--r--src/corelib/global/qglobal.cpp13
-rw-r--r--src/corelib/global/qlibraryinfo.cpp271
-rw-r--r--src/corelib/global/qlibraryinfo.h22
-rw-r--r--src/corelib/global/qsysinfo.h10
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp4
-rw-r--r--src/corelib/io/qsettings.cpp6
-rw-r--r--src/corelib/io/qsettings.h2
-rw-r--r--src/corelib/serialization/qjsoncbor.cpp2
-rw-r--r--src/corelib/text/qbytearray.cpp2
-rw-r--r--src/corelib/text/qbytearray.h2
-rw-r--r--src/corelib/text/qlocale_win.cpp4
-rw-r--r--src/corelib/text/qstring.cpp2
-rw-r--r--src/corelib/text/qstring.h2
16 files changed, 95 insertions, 330 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index ebbe5851bb..09ef97f47f 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -276,7 +276,7 @@ else()
target_compile_definitions(Core PUBLIC "QT_NAMESPACE=${QT_NAMESPACE}")
endif()
-qt_generate_qconfig_cpp()
+qt_generate_qconfig_cpp(global/qconfig.cpp.in global/qconfig.cpp)
set_target_properties(Core PROPERTIES INTERFACE_QT_COORD_TYPE "${QT_COORD_TYPE}")
set_property(TARGET Core APPEND PROPERTY COMPATIBLE_INTERFACE_STRING QT_COORD_TYPE)
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index b57511cb0a..4649395c5f 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -66,9 +66,7 @@
#define QT_NO_USING_NAMESPACE
#define QT_NO_DEPRECATED
-#ifndef QT_BUILD_QMAKE
#define QT_NO_REGEXP
-#endif
// Keep feature-test macros in alphabetic order by feature name:
#define QT_FEATURE_alloca 1
@@ -139,15 +137,7 @@
#define QT_FEATURE_zstd -1
#endif
-#ifdef QT_BUILD_QMAKE
-#define QT_FEATURE_commandlineparser -1
-#define QT_NO_COMPRESS
-#define QT_JSON_READONLY
-#define QT_FEATURE_settings 1
-#define QT_NO_STANDARDPATHS
-#else
#define QT_FEATURE_commandlineparser 1
#define QT_FEATURE_settings -1
-#endif
#endif // QT_BOOTSTRAPPED
diff --git a/src/corelib/global/qconfig.cpp.in b/src/corelib/global/qconfig.cpp.in
index 664924abec..d61b94c806 100644
--- a/src/corelib/global/qconfig.cpp.in
+++ b/src/corelib/global/qconfig.cpp.in
@@ -1,3 +1,19 @@
+/* This file is used to generate the Qt configuration info for the Core library
+ * and the qmake executable. The 'qt_generate_qconfig_cpp' cmake routine
+ * contains variables that replace '@' entires in this file. It's important to
+ * align these values with the following:
+ *
+ * - QLibraryInfo::LibraryPath enum in qtbase/src/corelib/global/qlibraryinfo.h
+ * - qtConfEntries in this file
+ * - QMakeLibraryInfo::LibraryPathQMakeExtras enum in
+ * qtbase/qmake/library/qmakelibraryinfo.h
+ *
+ * The reason for this is pointer mathematics in the QMakeLibraryInfo and
+ * QLibraryInfo implementation when iterating qt_configure_strs. Also
+ * qtConfEntries are strongly bound to QLibraryInfo::LibraryPath and
+ * QMakeLibraryInfo::LibraryPathQMakeExtras enums.
+ */
+
/* Installation date */
static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
/* Installation Info */
@@ -31,3 +47,58 @@ static const char qt_configure_strs[] =
# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
#endif
+
+
+/* Entries below are shared between qmake and the Core library. Please pay
+ * attention and read the adding rules here and inside QLibraryInfo header.
+ *
+ * To add a new entry in QLibraryInfo::LibraryPath, add it to the enum
+ * in qtbase/src/corelib/global/qlibraryinfo.h and:
+ * - add its relative path in the qtConfEntries[] array below
+ * (the key is what appears in a qt.conf file)
+ * - add a property name in qmake/property.cpp propList[] array
+ * (it's used with qmake -query)
+ * - add to qt_config.prf, qt_module.prf, qt_module_fwdpri.prf
+ */
+
+#ifdef QT_BUILD_QMAKE
+constexpr size_t qtConfEntriesKeySize = 23;
+#else
+constexpr size_t qtConfEntriesKeySize = 19;
+#endif
+
+static const struct {
+ char key[qtConfEntriesKeySize], value[13];
+} qtConfEntries[] = {
+ { "Prefix", "." },
+ { "Documentation", "doc" }, // should be ${Data}/doc
+ { "Headers", "include" },
+ { "Libraries", "lib" },
+#ifdef Q_OS_WIN
+ { "LibraryExecutables", "bin" },
+#else
+ { "LibraryExecutables", "libexec" }, // should be ${ArchData}/libexec
+#endif
+ { "Binaries", "bin" },
+ { "Plugins", "plugins" }, // should be ${ArchData}/plugins
+ { "Qml2Imports", "qml" }, // should be ${ArchData}/qml
+ { "ArchData", "." },
+ { "Data", "." },
+ { "Translations", "translations" }, // should be ${Data}/translations
+ { "Examples", "examples" },
+ { "Tests", "tests" },
+// Put new entries above this line ONLY!
+#ifdef QT_BUILD_QMAKE
+ { "Sysroot", "" },
+ { "SysrootifyPrefix", "" },
+ { "HostBinaries", "bin" },
+ { "HostLibraryExecutables", "libexec" },
+ { "HostLibraries", "lib" },
+ { "HostData", "." },
+ { "TargetSpec", "" },
+ { "HostSpec", "" },
+ { "HostPrefix", "" },
+#endif
+};
+
+static const char platformsSection[] = "Platforms";
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index c046b8078d..342fecb300 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1903,12 +1903,6 @@ bool qSharedBuild() noexcept
\sa QT_DISABLE_DEPRECATED_BEFORE
*/
-#if defined(QT_BUILD_QMAKE)
-// needed to bootstrap qmake
-static const unsigned int qt_one = 1;
-const int QSysInfo::ByteOrder = ((*((unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
-#endif
-
#if defined(Q_OS_MAC)
QT_BEGIN_INCLUDE_NAMESPACE
@@ -1982,13 +1976,8 @@ Q_GLOBAL_STATIC(QWindowsSockInit, winsockInit)
static QString readVersionRegistryString(const wchar_t *subKey)
{
-#if !defined(QT_BUILD_QMAKE)
- return QWinRegistryKey(HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows NT\CurrentVersion)")
+ return QWinRegistryKey(HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows NT\CurrentVersion)")
.stringValue(subKey);
-#else
- Q_UNUSED(subKey);
- return QString();
-#endif
}
static inline QString windows10ReleaseId()
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index d3f0f95ad8..b48b1b5d95 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -47,13 +47,7 @@
#include "qlibraryinfo.h"
#include "qscopedpointer.h"
-#ifdef QT_BUILD_QMAKE
-QT_BEGIN_NAMESPACE
-extern QString qmake_libraryInfoFile();
-QT_END_NAMESPACE
-#else
-# include "qcoreapplication.h"
-#endif
+#include "qcoreapplication.h"
#include "private/qglobal_p.h"
#include "qconfig.cpp"
@@ -64,12 +58,12 @@ QT_END_NAMESPACE
#include "archdetect.cpp"
-#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(relocatable) && QT_CONFIG(dlopen) && !QT_CONFIG(framework)
-# include <dlfcn.h>
+#if QT_CONFIG(relocatable) && QT_CONFIG(dlopen) && !QT_CONFIG(framework)
+# include <dlfcn.h>
#endif
-#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(relocatable) && defined(Q_OS_WIN)
-# include <qt_windows.h>
+#if QT_CONFIG(relocatable) && defined(Q_OS_WIN)
+# include <qt_windows.h>
#endif
QT_BEGIN_NAMESPACE
@@ -84,14 +78,7 @@ struct QLibrarySettings
void load();
QScopedPointer<QSettings> settings;
-#ifdef QT_BUILD_QMAKE
- bool haveDevicePaths;
- bool haveEffectiveSourcePaths;
- bool haveEffectivePaths;
- bool havePaths;
-#else
bool reloadOnQAppAvailable;
-#endif
};
Q_GLOBAL_STATIC(QLibrarySettings, qt_library_settings)
@@ -99,32 +86,12 @@ class QLibraryInfoPrivate
{
public:
static QSettings *findConfiguration();
-#ifdef QT_BUILD_QMAKE
- static void reload()
- {
- if (qt_library_settings.exists())
- qt_library_settings->load();
- }
- static bool haveGroup(QLibraryInfo::PathGroup group)
- {
- QLibrarySettings *ls = qt_library_settings();
- return ls ? (group == QLibraryInfo::EffectiveSourcePaths
- ? ls->haveEffectiveSourcePaths
- : group == QLibraryInfo::EffectivePaths
- ? ls->haveEffectivePaths
- : group == QLibraryInfo::DevicePaths
- ? ls->haveDevicePaths
- : ls->havePaths) : false;
- }
-#endif
static QSettings *configuration()
{
QLibrarySettings *ls = qt_library_settings();
if (ls) {
-#ifndef QT_BUILD_QMAKE
if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != nullptr)
ls->load();
-#endif
return ls->settings.data();
} else {
return nullptr;
@@ -132,8 +99,6 @@ public:
}
};
-static const char platformsSection[] = "Platforms";
-
QLibrarySettings::QLibrarySettings()
{
load();
@@ -143,48 +108,29 @@ void QLibrarySettings::load()
{
// If we get any settings here, those won't change when the application shows up.
settings.reset(QLibraryInfoPrivate::findConfiguration());
-#ifndef QT_BUILD_QMAKE
reloadOnQAppAvailable = (settings.data() == nullptr && QCoreApplication::instance() == nullptr);
bool haveDevicePaths;
bool haveEffectivePaths;
bool havePaths;
-#endif
if (settings) {
// This code needs to be in the regular library, as otherwise a qt.conf that
// works for qmake would break things for dynamically built Qt tools.
QStringList children = settings->childGroups();
haveDevicePaths = children.contains(QLatin1String("DevicePaths"));
-#ifdef QT_BUILD_QMAKE
- haveEffectiveSourcePaths = children.contains(QLatin1String("EffectiveSourcePaths"));
-#else
// EffectiveSourcePaths is for the Qt build only, so needs no backwards compat trickery.
bool haveEffectiveSourcePaths = false;
-#endif
haveEffectivePaths = haveEffectiveSourcePaths || children.contains(QLatin1String("EffectivePaths"));
// Backwards compat: an existing but empty file is claimed to contain the Paths section.
havePaths = (!haveDevicePaths && !haveEffectivePaths
&& !children.contains(QLatin1String(platformsSection)))
|| children.contains(QLatin1String("Paths"));
-#ifndef QT_BUILD_QMAKE
if (!havePaths)
settings.reset(nullptr);
-#else
- } else {
- haveDevicePaths = false;
- haveEffectiveSourcePaths = false;
- haveEffectivePaths = false;
- havePaths = false;
-#endif
}
}
QSettings *QLibraryInfoPrivate::findConfiguration()
{
-#ifdef QT_BUILD_QMAKE
- QString qtconfig = qmake_libraryInfoFile();
- if (!qtconfig.isEmpty())
- return new QSettings(qtconfig, QSettings::IniFormat);
-#else
QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
@@ -212,7 +158,6 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
}
-#endif
return nullptr; //no luck
}
@@ -236,8 +181,6 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
\sa QSysInfo, {Using qt.conf}
*/
-#ifndef QT_BUILD_QMAKE
-
/*!
\internal
@@ -354,81 +297,6 @@ QVersionNumber QLibraryInfo::version() noexcept
}
#endif // QT_BOOTSTRAPPED
-#endif // QT_BUILD_QMAKE
-
-/*
- * To add a new entry in QLibrary::LibraryPath, add it to the enum above the bootstrapped values and:
- * - add its relative path in the qtConfEntries[] array below
- * (the key is what appears in a qt.conf file)
- * - add a property name in qmake/property.cpp propList[] array
- * (it's used with qmake -query)
- * - add to qt_config.prf, qt_module.prf, qt_module_fwdpri.prf
- */
-
-#ifdef QT_BUILD_QMAKE
-constexpr size_t qtConfEntriesKeySize = 23;
-#else
-constexpr size_t qtConfEntriesKeySize = 19;
-#endif
-
-static const struct {
- char key[qtConfEntriesKeySize], value[13];
-} qtConfEntries[] = {
- { "Prefix", "." },
- { "Documentation", "doc" }, // should be ${Data}/doc
- { "Headers", "include" },
- { "Libraries", "lib" },
-#ifdef Q_OS_WIN
- { "LibraryExecutables", "bin" },
-#else
- { "LibraryExecutables", "libexec" }, // should be ${ArchData}/libexec
-#endif
- { "Binaries", "bin" },
- { "Plugins", "plugins" }, // should be ${ArchData}/plugins
- { "Qml2Imports", "qml" }, // should be ${ArchData}/qml
- { "ArchData", "." },
- { "Data", "." },
- { "Translations", "translations" }, // should be ${Data}/translations
- { "Examples", "examples" },
- { "Tests", "tests" },
-#ifdef QT_BUILD_QMAKE
- { "Sysroot", "" },
- { "SysrootifyPrefix", "" },
- { "HostBinaries", "bin" },
- { "HostLibraryExecutables", "libexec" },
- { "HostLibraries", "lib" },
- { "HostData", "." },
- { "TargetSpec", "" },
- { "HostSpec", "" },
- { "HostPrefix", "" },
-#endif
-};
-
-#ifdef QT_BUILD_QMAKE
-void QLibraryInfo::reload()
-{
- QLibraryInfoPrivate::reload();
-}
-
-void QLibraryInfo::sysrootify(QString *path)
-{
- if (!QVariant::fromValue(rawLocation(SysrootifyPrefixPath, FinalPaths)).toBool())
- return;
-
- const QString sysroot = rawLocation(SysrootPath, FinalPaths);
- if (sysroot.isEmpty())
- return;
-
- if (path->length() > 2 && path->at(1) == QLatin1Char(':')
- && (path->at(2) == QLatin1Char('/') || path->at(2) == QLatin1Char('\\'))) {
- path->replace(0, 2, sysroot); // Strip out the drive on Windows targets
- } else {
- path->prepend(sysroot);
- }
-}
-#endif // QT_BUILD_QMAKE
-
-#ifndef QT_BUILD_QMAKE
static QString prefixFromAppDirHelper()
{
QString appDir;
@@ -458,9 +326,8 @@ static QString prefixFromAppDirHelper()
return appDir;
}
-#endif
-#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(relocatable)
+#if QT_CONFIG(relocatable)
#if !defined(QT_STATIC) && !(defined(Q_OS_DARWIN) && QT_CONFIG(framework)) \
&& (QT_CONFIG(dlopen) || defined(Q_OS_WIN))
static QString prefixFromQtCoreLibraryHelper(const QString &qtCoreLibraryPath)
@@ -600,42 +467,9 @@ static QString getRelocatablePrefix()
}
#endif
-#if defined(QT_BUILD_QMAKE)
-QString qmake_abslocation();
-
-static QString getPrefixFromHostBinDir(const char *hostBinDirToPrefixPath)
+static QString getPrefix()
{
- const QString canonicalQMakePath = QFileInfo(qmake_abslocation()).canonicalPath();
- return QDir::cleanPath(canonicalQMakePath + QLatin1Char('/')
- + QLatin1String(hostBinDirToPrefixPath));
-}
-
-static QString getExtPrefixFromHostBinDir()
-{
- return getPrefixFromHostBinDir(QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH);
-}
-
-static QString getHostPrefixFromHostBinDir()
-{
- return getPrefixFromHostBinDir(QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH);
-}
-#endif
-
-static QString getPrefix(
-#ifdef QT_BUILD_QMAKE
- QLibraryInfo::PathGroup group
-#endif
- )
-{
-#if defined(QT_BUILD_QMAKE)
-# if QT_CONFIGURE_CROSSBUILD
- if (group == QLibraryInfo::DevicePaths)
- return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
-# else
- Q_UNUSED(group);
-# endif
- return getExtPrefixFromHostBinDir();
-#elif QT_CONFIG(relocatable)
+#if QT_CONFIG(relocatable)
return getRelocatablePrefix();
#else
return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
@@ -656,40 +490,10 @@ static QString getPrefix(
QString QLibraryInfo::path(LibraryPath p)
{
const LibraryPath loc = p;
-#ifdef QT_BUILD_QMAKE // ends inside rawLocation !
- QString ret = rawLocation(loc, FinalPaths);
-
- // Automatically prepend the sysroot to target paths
- if (loc < SysrootPath || loc > LastHostPath)
- sysrootify(&ret);
-
- return ret;
-}
-
-QString
-QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group)
-{
-#endif // QT_BUILD_QMAKE, started inside path!
QString ret;
bool fromConf = false;
#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
- // FinalPaths. For FinalPaths, use qt.conf if present and contains not only
- // [EffectivePaths], otherwise fall back to builtins.
- // EffectiveSourcePaths falls back to EffectivePaths.
- // DevicePaths falls back to FinalPaths.
- PathGroup orig_group = group;
- if (QLibraryInfoPrivate::haveGroup(group)
- || (group == EffectiveSourcePaths
- && (group = EffectivePaths, QLibraryInfoPrivate::haveGroup(group)))
- || ((group == EffectivePaths || group == DevicePaths)
- && (group = FinalPaths, QLibraryInfoPrivate::haveGroup(group)))
- || (group = orig_group, false))
-#else
if (QLibraryInfoPrivate::configuration())
-#endif
{
fromConf = true;
@@ -708,28 +512,9 @@ QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group)
if (!key.isNull()) {
QSettings *config = QLibraryInfoPrivate::configuration();
- config->beginGroup(QLatin1String(
-#ifdef QT_BUILD_QMAKE
- group == DevicePaths ? "DevicePaths" :
- group == EffectiveSourcePaths ? "EffectiveSourcePaths" :
- group == EffectivePaths ? "EffectivePaths" :
-#endif
- "Paths"));
+ config->beginGroup(QLatin1String("Paths"));
ret = config->value(key, defaultValue).toString();
-
-#ifdef QT_BUILD_QMAKE
- if (ret.isEmpty()) {
- if (loc == HostPrefixPath)
- ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key),
- QLatin1String(qtConfEntries[PrefixPath].value)).toString();
- else if (loc == TargetSpecPath || loc == HostSpecPath || loc == SysrootifyPrefixPath)
- fromConf = false;
- // The last case here is SysrootPath, which can be legitimately empty.
- // All other keys have non-empty fallbacks to start with.
- }
-#endif
-
int startIndex = 0;
forever {
startIndex = ret.indexOf(QLatin1Char('$'), startIndex);
@@ -765,59 +550,27 @@ QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group)
// strlen is meaningless.
const char * volatile path = nullptr;
if (loc == PrefixPath) {
- ret = getPrefix(
-#ifdef QT_BUILD_QMAKE
- group
-#endif
- );
+ ret = getPrefix();
} else if (unsigned(loc) <= sizeof(qt_configure_str_offsets)/sizeof(qt_configure_str_offsets[0])) {
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
#ifndef Q_OS_WIN // On Windows we use the registry
} else if (loc == SettingsPath) {
path = QT_CONFIGURE_SETTINGS_PATH;
#endif
-# ifdef QT_BUILD_QMAKE
- } else if (loc == HostPrefixPath) {
- static const QByteArray hostPrefixPath = getHostPrefixFromHostBinDir().toLatin1();
- path = hostPrefixPath.constData();
-# endif
}
if (path)
ret = QString::fromLocal8Bit(path);
}
-#ifdef QT_BUILD_QMAKE
- // These values aren't actually paths and thus need to be returned verbatim.
- if (loc == TargetSpecPath || loc == HostSpecPath || loc == SysrootifyPrefixPath)
- return ret;
-#endif
-
if (!ret.isEmpty() && QDir::isRelativePath(ret)) {
QString baseDir;
-#ifdef QT_BUILD_QMAKE
- if (loc == HostPrefixPath || loc == PrefixPath || loc == SysrootPath) {
- // We make the prefix/sysroot path absolute to the executable's directory.
- // loc == PrefixPath while a sysroot is set would make no sense here.
- // loc == SysrootPath only makes sense if qmake lives inside the sysroot itself.
- baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath();
- } else if (loc > SysrootPath && loc <= LastHostPath) {
- // We make any other host path absolute to the host prefix directory.
- baseDir = rawLocation(HostPrefixPath, group);
- } else {
- // we make any other path absolute to the prefix directory
- baseDir = rawLocation(PrefixPath, group);
- if (group == EffectivePaths)
- sysrootify(&baseDir);
- }
-#else
if (loc == PrefixPath) {
baseDir = prefixFromAppDirHelper();
} else {
// we make any other path absolute to the prefix directory
baseDir = path(PrefixPath);
}
-#endif // QT_BUILD_QMAKE
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
}
return ret;
@@ -838,7 +591,7 @@ QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group)
QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
{
-#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(settings)
+#if QT_CONFIG(settings)
QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());
if (!settings.isNull()) {
const QString key = QLatin1String(platformsSection)
@@ -849,7 +602,7 @@ QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
}
#else
Q_UNUSED(platformName);
-#endif // !QT_BUILD_QMAKE && settings
+#endif // settings
return QStringList();
}
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 618dfaab70..a7d44768c8 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -73,20 +73,7 @@ public:
ExamplesPath,
TestsPath,
// Insert new values above this line
- // Please read the comments in qlibraryinfo.cpp before adding
-#ifdef QT_BUILD_QMAKE
- // These are not subject to binary compatibility constraints
- SysrootPath,
- SysrootifyPrefixPath,
- HostBinariesPath,
- HostLibraryExecutablesPath,
- HostLibrariesPath,
- HostDataPath,
- TargetSpecPath,
- HostSpecPath,
- HostPrefixPath,
- LastHostPath = HostPrefixPath,
-#endif
+ // Please read the comments in qconfig.cpp.in before adding
SettingsPath = 100
};
static QString path(LibraryPath p);
@@ -96,13 +83,6 @@ public:
static QString location(LibraryLocation location)
{ return path(location); }
#endif
-#ifdef QT_BUILD_QMAKE
- enum PathGroup { FinalPaths, EffectivePaths, EffectiveSourcePaths, DevicePaths };
- static QString rawLocation(LibraryPath, PathGroup);
- static void reload();
- static void sysrootify(QString *path);
-#endif
-
static QStringList platformPluginArguments(const QString &platformName);
private:
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index 89e761c662..04379ecd7e 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -57,18 +57,9 @@ public:
WordSize = (sizeof(void *)<<3)
};
-#if defined(QT_BUILD_QMAKE)
enum Endian {
BigEndian,
LittleEndian
- };
- /* needed to bootstrap qmake */
- static const int ByteOrder;
-#elif defined(Q_BYTE_ORDER)
- enum Endian {
- BigEndian,
- LittleEndian
-
# ifdef Q_QDOC
, ByteOrder = BigEndian or LittleEndian
# elif Q_BYTE_ORDER == Q_BIG_ENDIAN
@@ -79,7 +70,6 @@ public:
# error "Undefined byte order"
# endif
};
-#endif
static QString buildCpuArchitecture();
static QString currentCpuArchitecture();
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index f27040b07c..6fa6ec2dc2 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -644,7 +644,7 @@ static inline QByteArray fileId(HANDLE handle)
// File ID for Windows starting from version 8.
QByteArray fileIdWin8(HANDLE handle)
{
-#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)
+#if !defined(QT_BOOTSTRAPPED)
QByteArray result;
FILE_ID_INFO infoEx;
if (GetFileInformationByHandleEx(handle,
@@ -658,7 +658,7 @@ QByteArray fileIdWin8(HANDLE handle)
result = fileId(handle); // GetFileInformationByHandleEx() is observed to fail for FAT32, QTBUG-74759
}
return result;
-#else // !QT_BOOTSTRAPPED && !QT_BUILD_QMAKE
+#else // !QT_BOOTSTRAPPED
return fileId(handle);
#endif
}
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 7f16a82199..97e3bf884b 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -60,9 +60,7 @@
#include "qrect.h"
#endif // !QT_NO_GEOM_VARIANT
-#ifndef QT_BUILD_QMAKE
-# include "qcoreapplication.h"
-#endif
+#include "qcoreapplication.h"
#ifndef QT_BOOTSTRAPPED
#include "qsavefile.h"
@@ -2661,7 +2659,6 @@ QSettings::QSettings(const QString &fileName, Format format)
d_ptr->q_ptr = this;
}
-# ifndef QT_BUILD_QMAKE
QSettings::QSettings(Scope scope)
: d_ptr(QSettingsPrivate::create(globalDefaultFormat, scope,
# ifdef Q_OS_DARWIN
@@ -2678,7 +2675,6 @@ QSettings::QSettings(Scope scope)
{
d_ptr->q_ptr = this;
}
-# endif
#endif
/*!
diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h
index 8fde893c23..05b30b562b 100644
--- a/src/corelib/io/qsettings.h
+++ b/src/corelib/io/qsettings.h
@@ -138,9 +138,7 @@ public:
QSettings(Format format, Scope scope, const QString &organization,
const QString &application = QString());
QSettings(const QString &fileName, Format format);
-# ifndef QT_BUILD_QMAKE
explicit QSettings(Scope scope = UserScope);
-# endif
#endif
~QSettings();
diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp
index 6256028c3a..53ee73d905 100644
--- a/src/corelib/serialization/qjsoncbor.cpp
+++ b/src/corelib/serialization/qjsoncbor.cpp
@@ -201,7 +201,6 @@ QJsonValue qt_convertToJson(QCborContainerPrivate *d, qsizetype idx,
static QJsonValue convertExtendedTypeToJson(QCborContainerPrivate *d)
{
-#ifndef QT_BUILD_QMAKE
qint64 tag = d->elements.at(0).value;
switch (tag) {
@@ -222,7 +221,6 @@ static QJsonValue convertExtendedTypeToJson(QCborContainerPrivate *d)
return s;
}
}
-#endif
// for all other tags, ignore it and return the converted tagged item
return qt_convertToJson(d, 1);
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index a815037a73..bead997ab8 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -2999,7 +2999,7 @@ void QByteArray::clear()
d.clear();
}
-#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
+#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
/*! \relates QByteArray
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index e16d888d62..0aad272f94 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -675,7 +675,7 @@ inline std::string QByteArray::toStdString() const
inline QByteArray QByteArray::fromStdString(const std::string &s)
{ return QByteArray(s.data(), qsizetype(s.size())); }
-#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
+#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QByteArray &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QByteArray &);
#endif
diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp
index bc7c6e1fb6..664e82a5aa 100644
--- a/src/corelib/text/qlocale_win.cpp
+++ b/src/corelib/text/qlocale_win.cpp
@@ -595,7 +595,7 @@ QVariant QSystemLocalePrivate::uiLanguages()
{
unsigned long cnt = 0;
QVarLengthArray<wchar_t, 64> buf(64);
-# if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE) // Not present in MinGW 4.9/bootstrap builds.
+# if !defined(QT_BOOTSTRAPPED) // Not present in MinGW 4.9/bootstrap builds.
unsigned long size = buf.size();
if (!GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &cnt, buf.data(), &size)) {
size = 0;
@@ -606,7 +606,7 @@ QVariant QSystemLocalePrivate::uiLanguages()
return QStringList();
}
}
-# endif // !QT_BOOTSTRAPPED && !QT_BUILD_QMAKE
+# endif // !QT_BOOTSTRAPPED
QStringList result;
result.reserve(cnt);
const wchar_t *str = buf.constData();
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index da212ac291..a6f3cd2b5d 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -9735,7 +9735,7 @@ QString &QString::setRawData(const QChar *unicode, qsizetype size)
equal to string \a s2; otherwise returns \c false.
*/
-#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
+#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
/*!
\fn QDataStream &operator<<(QDataStream &stream, const QString &string)
\relates QString
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 8926f6f3af..abf8957be9 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -1454,7 +1454,7 @@ inline std::u32string QString::toStdU32String() const
return u32str;
}
-#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
+#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QString &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QString &);
#endif