Skip clearing the QIcon cache on QIconLoader theme key change

QThemeIconEngine takes care of creating a new icon engine when
the icon theme key changes, so we don't need to invalidate the
entire QIcon cache.

Change-Id: Ie3bca00a9146d1f429b2a6f8ab0b39e15834d158
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4dacaaf15a51860f3a7a2d72ca033ccc38165de1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2023-06-15 14:54:01 +02:00 committed by Qt Cherry-pick Bot
parent 33402cdf69
commit 7ab0bcbf8e

View File

@ -137,9 +137,10 @@ void QIconLoader::updateSystemTheme()
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++;
QIconPrivate::clearIconCache();
}
QString QIconLoader::themeName() const