Don't include kdeglobals when dealing with a cache config

The svg elements cache isn't really a "configuration" and it's not
something that should be overridden by global config settings.

Loading it as a simple config skips the cascading and saves reparsing
kdeglobals.

REVIEW: 128966
This commit is contained in:
David Edmundson 2016-09-21 07:11:28 +01:00
parent 16b478a827
commit 494c690b18

View File

@ -266,7 +266,7 @@ bool ThemePrivate::useCache()
}
const QString svgElementsFile = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + '/' + svgElementsFileName;
svgElementsCache = KSharedConfig::openConfig(svgElementsFile);
svgElementsCache = KSharedConfig::openConfig(svgElementsFile, KConfig::SimpleConfig);
QString currentIconThemePath;
const auto *iconTheme = KIconLoader::global()->theme();
if (iconTheme) {
@ -277,7 +277,7 @@ bool ThemePrivate::useCache()
if (oldIconThemePath != currentIconThemePath) {
discardCache(PixmapCache | SvgElementsCache);
globalGroup.writeEntry("currentIconThemePath", currentIconThemePath);
svgElementsCache = KSharedConfig::openConfig(svgElementsFile);
svgElementsCache = KSharedConfig::openConfig(svgElementsFile, KConfig::SimpleConfig);
}
}