summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-04-18 16:21:44 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-04-21 22:25:12 +0200
commitfd803a6d04f9fdda5f8aaf27e0c5351c7f9ce376 (patch)
tree6af8dcf6017ecc10ef05ddbfe7e80cb49511c530 /src/gui/kernel/qguiapplication.cpp
parent5907a0a944958030ccec902edef2733fe884b6ef (diff)
Rename QGuiApplicationPrivate::notifyThemeChanged to handleThemeChanged
The work done by QGuiApplicationPrivate in response to a theme change goes beyond notifying. Change-Id: I27c74adf6549c553e659c7b8e271945ce753031c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8c9bb75844..2ccaf2565b 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2585,13 +2585,27 @@ void QGuiApplicationPrivate::processSafeAreaMarginsChangedEvent(QWindowSystemInt
void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate::ThemeChangeEvent *tce)
{
if (self)
- self->notifyThemeChanged();
+ self->handleThemeChanged();
if (QWindow *window = tce->window.data()) {
QEvent e(QEvent::ThemeChange);
QGuiApplication::sendSpontaneousEvent(window, &e);
}
}
+void QGuiApplicationPrivate::handleThemeChanged()
+{
+ updatePalette();
+
+ QAbstractFileIconProviderPrivate::clearIconTypeCache();
+
+ if (!(applicationResourceFlags & ApplicationFontExplicitlySet)) {
+ const auto locker = qt_scoped_lock(applicationFontMutex);
+ clearFontUnlocked();
+ initFontUnlocked();
+ }
+ initThemeHints();
+}
+
void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e)
{
if (e->window.isNull())
@@ -4198,20 +4212,6 @@ QPoint QGuiApplicationPrivate::QLastCursorPosition::toPoint() const noexcept
return thePoint.toPoint();
}
-void QGuiApplicationPrivate::notifyThemeChanged()
-{
- updatePalette();
-
- QAbstractFileIconProviderPrivate::clearIconTypeCache();
-
- if (!(applicationResourceFlags & ApplicationFontExplicitlySet)) {
- const auto locker = qt_scoped_lock(applicationFontMutex);
- clearFontUnlocked();
- initFontUnlocked();
- }
- initThemeHints();
-}
-
#if QT_CONFIG(draganddrop)
void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)
{