Since Qt 6, qIconCache does not store null icons. In case an icon name
lookup is unsuccessful, the (expensive) lookup is repeated each time.
This patch reverts 9e7c567050, which
removes a null icon from the cache once it has been found in the cache.
In fact, that could no longer happen due to
4dc7102c84, which prevented null icons
from being cached at all. Therefore, it is also reverted by this patch.
The cache will be cleared when
- the system icon theme name changes or
- QGuiApplicationPrivate::processThemeChanged is called (e.g. due to
a change of the system's color scheme)
Fixes: QTBUG-112257
Pick-to: 6.5
Change-Id: I80cd21fa39dc31c4bae60a8e66e78d9da20e9b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>