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:
parent
bd55ecbbce
commit
33f22d821f
@ -135,8 +135,9 @@ void QIconLoader::invalidateKey()
|
|||||||
{
|
{
|
||||||
// Invalidating the key here will result in QThemeIconEngine
|
// Invalidating the key here will result in QThemeIconEngine
|
||||||
// recreating the actual engine the next time the icon is used.
|
// recreating the actual engine the next time the icon is used.
|
||||||
// We don't need to clear the QIcon cache itself.
|
|
||||||
m_themeKey++;
|
m_themeKey++;
|
||||||
|
// Since the key has changed, we need to clear the cache as well.
|
||||||
|
QIconPrivate::clearIconCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QIconLoader::themeName() const
|
QString QIconLoader::themeName() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user