From 7279e97dc3a5fc4c66e53b957c71962b10fe710b Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 14 Aug 2023 13:15:52 +0200 Subject: [PATCH] Revert "QIconLoader: clear cache when the key becomes invalid" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e2f0495e7efffefe927e43b26fa3a3a610aa003f. Cleaning the cache is not be needed, as the invalidated key will make sure that the cached QThemeIconEngine engine will not reuse the previous engine to generate the pixmap, but request a new engine from QPA. This way, a new pixmap will be generated also if system settings change that will influence the pixmap generated by the platform engine. Change-Id: I9632c37c4ec86fe46acb701ec69a7868b3434322 Reviewed-by: Tor Arne Vestbø (cherry picked from commit fd5c2058ae089611200f00b8b7ba76a8d339c506) Reviewed-by: Qt Cherry-pick Bot --- src/gui/image/qiconloader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 7eb4dcd97e9..876c3e0f86b 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -135,9 +135,8 @@ void QIconLoader::invalidateKey() { // Invalidating the key here will result in QThemeIconEngine // recreating the actual engine the next time the icon is used. + // We don't need to clear the QIcon cache itself. m_themeKey++; - // Since the key has changed, we need to clear the cache as well. - QIconPrivate::clearIconCache(); } QString QIconLoader::themeName() const