QCoreApplicationPrivate: use NSDMI to initialize the members
This removes the need for #if in the initialization list and the ugly whitespace-before-punctuation syntax. Pick-to: 6.9 Change-Id: Id33ec83e574360f65c9bfffd22b8cb450156477b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
bf8a5ab418
commit
f68df05a77
@ -424,24 +424,7 @@ static inline bool contains(int argc, char **argv, const char *needle)
|
|||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv)
|
QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv)
|
||||||
:
|
: argc(aargc), argv(aargv)
|
||||||
#ifndef QT_NO_QOBJECT
|
|
||||||
QObjectPrivate(),
|
|
||||||
#endif
|
|
||||||
argc(aargc)
|
|
||||||
, argv(aargv)
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
, origArgc(0)
|
|
||||||
, origArgv(nullptr)
|
|
||||||
#endif
|
|
||||||
, application_type(QCoreApplicationPrivate::Tty)
|
|
||||||
#ifndef QT_NO_QOBJECT
|
|
||||||
, in_exec(false)
|
|
||||||
, aboutToQuitEmitted(false)
|
|
||||||
, threadData_clean(false)
|
|
||||||
#else
|
|
||||||
, q_ptr(nullptr)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static const char *const empty = "";
|
static const char *const empty = "";
|
||||||
if (argc == 0 || argv == nullptr) {
|
if (argc == 0 || argv == nullptr) {
|
||||||
|
@ -125,8 +125,8 @@ public:
|
|||||||
int &argc;
|
int &argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
int origArgc;
|
int origArgc = 0;
|
||||||
char **origArgv; // store unmodified arguments for QCoreApplication::arguments()
|
char **origArgv = nullptr; // store unmodified arguments for QCoreApplication::arguments()
|
||||||
bool consoleAllocated = false;
|
bool consoleAllocated = false;
|
||||||
#endif
|
#endif
|
||||||
void appendApplicationPathToLibraryPaths(void);
|
void appendApplicationPathToLibraryPaths(void);
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
static bool isTranslatorInstalled(QTranslator *translator);
|
static bool isTranslatorInstalled(QTranslator *translator);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QCoreApplicationPrivate::Type application_type;
|
Type application_type = Tty;
|
||||||
|
|
||||||
QString cachedApplicationDirPath;
|
QString cachedApplicationDirPath;
|
||||||
static QString *cachedApplicationFilePath;
|
static QString *cachedApplicationFilePath;
|
||||||
@ -147,9 +147,9 @@ public:
|
|||||||
#ifndef QT_NO_QOBJECT
|
#ifndef QT_NO_QOBJECT
|
||||||
void execCleanup();
|
void execCleanup();
|
||||||
|
|
||||||
bool in_exec;
|
bool in_exec = false;
|
||||||
bool aboutToQuitEmitted;
|
bool aboutToQuitEmitted = false;
|
||||||
bool threadData_clean;
|
bool threadData_clean = false;
|
||||||
|
|
||||||
static QAbstractEventDispatcher *eventDispatcher;
|
static QAbstractEventDispatcher *eventDispatcher;
|
||||||
static bool is_app_running;
|
static bool is_app_running;
|
||||||
@ -165,7 +165,7 @@ public:
|
|||||||
inline QString qmljsDebugArgumentsString() const { return qmljs_debug_arguments; }
|
inline QString qmljsDebugArgumentsString() const { return qmljs_debug_arguments; }
|
||||||
|
|
||||||
#ifdef QT_NO_QOBJECT
|
#ifdef QT_NO_QOBJECT
|
||||||
QCoreApplication *q_ptr;
|
QCoreApplication *q_ptr = nullptr;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user