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