diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-06-09 12:46:37 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-06-13 17:58:22 -0700 |
commit | c4af4dcb5d41fa5d82f9e7986006202671f1681f (patch) | |
tree | 4dd8c7fb122e9f1521c6daf4e0de32ea57a06537 | |
parent | 6ae2bfad411faf896fdca83a55db1e24a0b70e73 (diff) |
QCoreApplication: Remove app_compile_version
It's not used for anything, so remove the temptation of trying to use it
to make decisions at runtime about a behavior. It's the wrong tool for
the job: it might tell you the version of Qt the *application* was
compiled against, but not the version any of the Qt-using libraries
were.
Pick-to: 6.4
Change-Id: I175efddd75f24ae59057fffd16f70b77dd87faf4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_p.h | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 328e5b29de..eb5945b5ae 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -108,12 +108,6 @@ using namespace Qt::StringLiterals; extern QString qAppFileName(); #endif -#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) -# error "Bump QCoreApplicatoinPrivate::app_compile_version to QT_VERSION_CHECK(7, 0, 0)" -#endif -// We don't know exactly, but it's at least 6.0.0: -Q_CONSTINIT int QCoreApplicationPrivate::app_compile_version = QT_VERSION_CHECK(6, 0, 0); - Q_CONSTINIT bool QCoreApplicationPrivate::setuidAllowed = false; #if !defined(Q_OS_WIN) @@ -399,7 +393,7 @@ static inline bool contains(int argc, char **argv, const char *needle) } #endif // Q_OS_WIN -QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint flags) +QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint) : #ifndef QT_NO_QOBJECT QObjectPrivate(), @@ -419,7 +413,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint , q_ptr(nullptr) #endif { - app_compile_version = flags & 0xffffff; static const char *const empty = ""; if (argc == 0 || argv == nullptr) { argc = 0; diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index cfd40306c7..b5621f1de6 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -56,7 +56,7 @@ public: Gui }; - QCoreApplicationPrivate(int &aargc, char **aargv, uint flags); + QCoreApplicationPrivate(int &aargc, char **aargv, uint); // If not inheriting from QObjectPrivate: force this class to be polymorphic #ifdef QT_NO_QOBJECT @@ -156,7 +156,6 @@ public: static bool setuidAllowed; static uint attribs; static inline bool testAttribute(uint flag) { return attribs & (1 << flag); } - static int app_compile_version; void processCommandLineArguments(); QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging. |