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. Change-Id: I9632c37c4ec86fe46acb701ec69a7868b3434322 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fd5c2058ae089611200f00b8b7ba76a8d339c506) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d5fbeeff52
commit
7279e97dc3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user