From 3025dc597fd1026b7c1aae55fd576fda154ff1c1 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 27 May 2023 16:03:03 +0400 Subject: [PATCH] Update QIconLoader system theme names on QWSI ThemeChange MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GTK platform theme (and possibly others) emit theme change when the named icon theme changes, but that was not propagated to QIconLoader. We now call QIconLoader::updateSystemTheme(), but note that if a user theme has been set we ignore the system theme update and will end up with a stale value, even if the user theme is later cleared. This will be fixed in a follow up commit. Pick-to: 6.6 6.5 Change-Id: I40b537f3618f44d396db0c7ca67e515dfcdfba44 Reviewed-by: Axel Spoerl Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index fe40e05536c..c605b5ad6a1 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -9,6 +9,7 @@ #include #include "private/qevent_p.h" #include "private/qeventpoint_p.h" +#include "private/qiconloader_p.h" #include "qfont.h" #include "qpointingdevice.h" #include @@ -2650,6 +2651,7 @@ void QGuiApplicationPrivate::handleThemeChanged() { updatePalette(); + QIconLoader::instance()->updateSystemTheme(); QAbstractFileIconProviderPrivate::clearIconTypeCache(); if (!(applicationResourceFlags & ApplicationFontExplicitlySet)) {