QIconLoader: clear cache when the key becomes invalid

Pick-to: 6.6
Change-Id: I6f2745715b902ccbc87d78b1c90f6883cfdd76ae
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-07-20 02:35:53 +02:00
parent cb16ba5980
commit e2f0495e7e

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