summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp9
-rw-r--r--src/gui/kernel/qguiapplication.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 45df47730d..c6facb8ceb 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1900,10 +1900,11 @@ bool QGuiApplication::event(QEvent *e)
if (topLevelWindow->flags() != Qt::Desktop)
postEvent(topLevelWindow, new QEvent(QEvent::LanguageChange));
}
- } else if (e->type() == QEvent::ApplicationFontChange) {
+ } else if (e->type() == QEvent::ApplicationFontChange ||
+ e->type() == QEvent::ApplicationPaletteChange) {
for (auto *topLevelWindow : QGuiApplication::topLevelWindows()) {
if (topLevelWindow->flags() != Qt::Desktop)
- postEvent(topLevelWindow, new QEvent(QEvent::ApplicationFontChange));
+ postEvent(topLevelWindow, new QEvent(e->type()));
}
} else if (e->type() == QEvent::Quit) {
// Close open windows. This is done in order to deliver de-expose
@@ -3271,8 +3272,10 @@ QClipboard * QGuiApplication::clipboard()
/*!
\since 5.4
\fn void QGuiApplication::paletteChanged(const QPalette &palette)
+ \obsolete
- This signal is emitted when the \a palette of the application changes.
+ This signal is emitted when the \a palette of the application changes. Use
+ QEvent::ApplicationPaletteChanged instead.
\sa palette()
*/
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 0c642d8ff5..6017cf513f 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -188,9 +188,9 @@ Q_SIGNALS:
void commitDataRequest(QSessionManager &sessionManager);
void saveStateRequest(QSessionManager &sessionManager);
#endif
- void paletteChanged(const QPalette &pal);
void applicationDisplayNameChanged();
#if QT_DEPRECATED_SINCE(6, 0)
+ void paletteChanged(const QPalette &pal);
void fontChanged(const QFont &font);
#endif
protected: