diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 2ccaf2565b..1f53aa2593 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2586,10 +2586,11 @@ void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate:: { if (self) self->handleThemeChanged(); - if (QWindow *window = tce->window.data()) { - QEvent e(QEvent::ThemeChange); - QGuiApplication::sendSpontaneousEvent(window, &e); - } + + QEvent themeChangeEvent(QEvent::ThemeChange); + const QWindowList windows = tce->window ? QWindowList{tce->window} : window_list; + for (auto *window : windows) + QGuiApplication::sendSpontaneousEvent(window, &themeChangeEvent); } void QGuiApplicationPrivate::handleThemeChanged() |