From 295d4d6955ff96888273fb23906ca75a10795ca2 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Thu, 28 Jan 2021 16:30:01 +0100 Subject: [PATCH] Remove usage of the definitions that are never defined The QT_BUILD_QMAKE_BOOTSTRAP and QT_BUILD_QMAKE_LIBRARY definitions are never defined in the project since migrating to CMake build. Change-Id: I7108c92387005a2fde6ebdb2d74843e3efc6413e Reviewed-by: Joerg Bornemann --- qmake/option.cpp | 2 -- src/corelib/global/qlibraryinfo.cpp | 12 +++--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/qmake/option.cpp b/qmake/option.cpp index 2a3fea8a892..0d5746bb09a 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -455,12 +455,10 @@ Option::init(int argc, char **argv) QString proj = detectProjectFile(qmake_getpwd()); if(!proj.isNull()) Option::mkfile::project_files.append(proj); -#ifndef QT_BUILD_QMAKE_LIBRARY if(Option::mkfile::project_files.isEmpty()) { usage(argv[0]); return Option::QMAKE_CMDLINE_ERROR; } -#endif } } diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index bb1eafeccd2..a86436f4c8a 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -55,10 +55,8 @@ QT_END_NAMESPACE # include "qcoreapplication.h" #endif -#ifndef QT_BUILD_QMAKE_BOOTSTRAP -# include "private/qglobal_p.h" -# include "qconfig.cpp" -#endif +#include "private/qglobal_p.h" +#include "qconfig.cpp" #ifdef Q_OS_DARWIN # include "private/qcore_mac_p.h" @@ -595,7 +593,7 @@ static QString getRelocatablePrefix() } #endif -#if defined(QT_BUILD_QMAKE) && !defined(QT_BUILD_QMAKE_BOOTSTRAP) +#if defined(QT_BUILD_QMAKE) QString qmake_abslocation(); static QString getPrefixFromHostBinDir(const char *hostBinDirToPrefixPath) @@ -616,7 +614,6 @@ static QString getHostPrefixFromHostBinDir() } #endif -#ifndef QT_BUILD_QMAKE_BOOTSTRAP static QString getPrefix( #ifdef QT_BUILD_QMAKE QLibraryInfo::PathGroup group @@ -637,7 +634,6 @@ static QString getPrefix( return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH); #endif } -#endif // QT_BUILD_QMAKE_BOOTSTRAP /*! \fn QString QLibraryInfo::location(LibraryLocation loc) \obsolete Use path() instead. @@ -754,7 +750,6 @@ QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group) } #endif // settings -#ifndef QT_BUILD_QMAKE_BOOTSTRAP if (!fromConf) { // "volatile" here is a hack to prevent compilers from doing a // compile-time strlen() on "path". The issue is that Qt installers @@ -784,7 +779,6 @@ QLibraryInfo::rawLocation(LibraryPath loc, PathGroup group) if (path) ret = QString::fromLocal8Bit(path); } -#endif #ifdef QT_BUILD_QMAKE // These values aren't actually paths and thus need to be returned verbatim.