From c4af4dcb5d41fa5d82f9e7986006202671f1681f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 9 Jun 2022 12:46:37 -0700 Subject: 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 --- src/corelib/kernel/qcoreapplication.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication.cpp') 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; -- cgit v1.2.3