In new Qt (not sure which version) QIcon::fromTheme(QString) returns a
valid icon object, thus hasThemeIcon always returns true as that simply
calls fromTheme internally and checks the names match.
This patch uses the same check as the new QIcon::fromTheme(QString
&name, QIcon fallback) to check the original icon was found.
This patch is therefore not only is a workaround but also a speed bost
as before we were effectively loading the same icon twice.
BUG: 365111