Theme::currentThemeHasImage should not return true if parent themes match

BUG: 439847
This commit is contained in:
Aleix Pol 2021-07-15 00:37:14 +02:00 committed by Aleix Pol Gonzalez
parent 8bacaa045b
commit f7d63bc30b
1 changed files with 5 additions and 1 deletions

View File

@ -243,7 +243,11 @@ bool Theme::currentThemeHasImage(const QString &name) const
return false;
}
return !d->findInTheme(name % QLatin1String(".svgz"), d->themeName).isEmpty() || !d->findInTheme(name % QLatin1String(".svg"), d->themeName).isEmpty();
QString path = d->findInTheme(name % QLatin1String(".svgz"), d->themeName);
if (path.isEmpty()) {
path = d->findInTheme(name % QLatin1String(".svg"), d->themeName);
}
return path.contains(QLatin1String("/" PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % d->themeName);
}
KSharedConfigPtr Theme::colorScheme() const