summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-21 13:03:09 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-21 13:03:09 +0100
commitf94ca82e0ff6345648b499911411f2dcc1849267 (patch)
treebc5acac8bfecaf5bccc612f5b009bf249bc69ef1 /src/gui/kernel/qguiapplication.cpp
parentfe29a6a6ebbf28505df7cdf1de24fa540fd3745e (diff)
parentb1092a7d4240d419cc2b5f3f5c326a1cb680bbdd (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8f4c674952..4a0febc615 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3755,7 +3755,7 @@ Qt::LayoutDirection QGuiApplication::layoutDirection()
Returns the active application override cursor.
- This function returns 0 if no application cursor has been defined (i.e. the
+ This function returns \nullptr if no application cursor has been defined (i.e. the
internal cursor stack is empty).
\sa setOverrideCursor(), restoreOverrideCursor()
@@ -3991,6 +3991,9 @@ void QGuiApplicationPrivate::notifyThemeChanged()
!QCoreApplication::testAttribute(Qt::AA_SetPalette)) {
clearPalette();
initPalette();
+ emit qGuiApp->paletteChanged(*app_pal);
+ if (is_app_running && !is_app_closing)
+ sendApplicationPaletteChange();
}
if (!(applicationResourceFlags & ApplicationFontExplicitlySet)) {
QMutexLocker locker(&applicationFontMutex);
@@ -3999,6 +4002,15 @@ void QGuiApplicationPrivate::notifyThemeChanged()
}
}
+void QGuiApplicationPrivate::sendApplicationPaletteChange(bool toAllWidgets, const char *className)
+{
+ Q_UNUSED(toAllWidgets)
+ Q_UNUSED(className)
+
+ QEvent event(QEvent::ApplicationPaletteChange);
+ QGuiApplication::sendEvent(QGuiApplication::instance(), &event);
+}
+
#if QT_CONFIG(draganddrop)
void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)
{