diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 7799be77d2..ceb5055a9d 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1306,6 +1306,7 @@ static void init_plugins(const QList<QByteArray> &pluginList) } } +#if QT_CONFIG(commandlineparser) void QGuiApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options) { QCoreApplicationPrivate::addQtOptions(options); @@ -1357,6 +1358,7 @@ void QGuiApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options) QGuiApplication::tr("Alias for --windowtitle."), QStringLiteral("title"))); } } +#endif // QT_CONFIG(commandlineparser) void QGuiApplicationPrivate::createPlatformIntegration() { @@ -3260,9 +3262,12 @@ void QGuiApplication::setPalette(const QPalette &pal) QGuiApplicationPrivate::app_pal = new QPalette(pal); else *QGuiApplicationPrivate::app_pal = pal; + applicationResourceFlags |= ApplicationPaletteExplicitlySet; QCoreApplication::setAttribute(Qt::AA_SetPalette); - emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal); + + if (qGuiApp) + emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal); } void QGuiApplicationPrivate::applyWindowGeometrySpecificationTo(QWindow *window) |