use plasmarc

svn path=/trunk/KDE/kdelibs/; revision=916816
This commit is contained in:
Aaron J. Seigo 2009-01-26 04:41:39 +00:00
parent 029154f2ff
commit b4b0494129

View File

@ -67,8 +67,7 @@ public:
hasWallpapers(false)
{
generalFont = QApplication::font();
KConfigGroup cg(KGlobal::config(), "CachePolicies");
cacheTheme = cg.readEntry("CacheTheme", true);
cacheTheme = cacheConfig().readEntry("CacheTheme", true);
}
~ThemePrivate()
@ -76,6 +75,11 @@ public:
delete pixmapCache;
}
KConfigGroup cacheConfig()
{
return KConfigGroup(KSharedConfig::openConfig("plasmarc"), "CachePolicies");
}
KConfigGroup &config()
{
if (!cfg.isValid()) {
@ -138,9 +142,8 @@ const char *ThemePrivate::defaultTheme = "default";
bool ThemePrivate::useCache()
{
if (cacheTheme && !pixmapCache) {
KConfigGroup cg(KGlobal::config(), "CachePolicies");
pixmapCache = new KPixmapCache("plasma_theme_" + themeName);
pixmapCache->setCacheLimit(cg.readEntry("ThemeCacheKb", 80 * 1024));
pixmapCache->setCacheLimit(cacheConfig().readEntry("ThemeCacheKb", 80 * 1024));
}
return cacheTheme;