Properly look for fallback themes

Summary:
At the moment we always look at the first fallback and load the original
theme again, rendering moot the fallback look-up.

Reviewers: #plasma, davidedmundson, hein

Reviewed By: #plasma, davidedmundson, hein

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15970
This commit is contained in:
Aleix Pol 2018-10-05 19:24:16 +02:00
parent f4ffdd8f3f
commit 8c18054a0d

View File

@ -825,7 +825,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
while (!fallback.isEmpty() && !fallbackThemes.contains(fallback)) {
fallbackThemes.append(fallback);
QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/metadata.desktop")));
QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % fallback % QLatin1Literal("/metadata.desktop")));
KConfig metadata(metadataPath, KConfig::SimpleConfig);
KConfigGroup cg(&metadata, "Settings");
fallback = cg.readEntry("FallbackTheme", QString());