Revert "QIconLoader: clear cache when the key becomes invalid"

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.

Pick-to: 6.6
Change-Id: I9632c37c4ec86fe46acb701ec69a7868b3434322
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-08-14 13:15:52 +02:00
parent 7544d91ae1
commit fd5c2058ae

View File

@ -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