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>
This commit is contained in:
parent
6ae2bfad41
commit
c4af4dcb5d
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user