Let QIcon::fromTheme check whether the tray icon is valid

QIcon::fromTheme overload with a fallback does a smarter check whether the icon is valid, use it to prevent getting a half-valid QIcon.
This commit is contained in:
Ilya Fedin 2025-03-27 15:00:30 +00:00 committed by John Preston
parent 5f73e8b3bf
commit 3c2f8b65ce

View file

@ -95,7 +95,7 @@ QIcon IconGraphic::systemIcon() const {
if (candidate.isEmpty()) {
continue;
}
const auto icon = QIcon::fromTheme(candidate);
const auto icon = QIcon::fromTheme(candidate, QIcon());
if (icon.name() == candidate) {
return icon;
}