use plasmarc
svn path=/trunk/KDE/kdelibs/; revision=916816
This commit is contained in:
parent
029154f2ff
commit
b4b0494129
11
theme.cpp
11
theme.cpp
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user