QIconLoader: clear cache when the key becomes invalid

Change-Id: I6f2745715b902ccbc87d78b1c90f6883cfdd76ae
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e2f0495e7efffefe927e43b26fa3a3a610aa003f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2023-07-20 02:35:53 +02:00 committed by Qt Cherry-pick Bot
parent bd55ecbbce
commit 33f22d821f

View File

@ -135,8 +135,9 @@ 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