use the ThemeGlobal kconfigxt class in Theme

svn path=/trunk/KDE/kdelibs/; revision=1032413
This commit is contained in:
Aaron J. Seigo 2009-10-07 18:44:33 +00:00
parent ca63e9647b
commit 154f7d0e38
2 changed files with 7 additions and 7 deletions

View File

@ -159,6 +159,8 @@ set(plasma_LIB_SRCS
private/qtjolie-branch/qtjolie/serverthread.cpp
)
kde4_add_kcfg_files(plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcfgc)
kde4_add_ui_files(plasma_LIB_SRCS
private/pinpairing.ui
private/publish.ui)

View File

@ -42,6 +42,7 @@
#include <kwindowsystem.h>
#include "private/packages_p.h"
#include "libplasma-theme-global.h"
namespace Plasma
{
@ -72,7 +73,8 @@ public:
useNativeWidgetStyle(false)
{
generalFont = QApplication::font();
cacheTheme = cacheConfig().readEntry("CacheTheme", true);
ThemeConfig config;
cacheTheme = config.cacheTheme();
#ifdef Q_WS_X11
Display *dpy = QX11Info::display();
@ -98,11 +100,6 @@ public:
delete pixmapCache;
}
KConfigGroup cacheConfig()
{
return KConfigGroup(KSharedConfig::openConfig(themeRcFile), "CachePolicies");
}
KConfigGroup &config()
{
if (!cfg.isValid()) {
@ -177,7 +174,8 @@ bool ThemePrivate::useCache()
{
if (cacheTheme && !pixmapCache) {
pixmapCache = new KPixmapCache("plasma_theme_" + themeName);
pixmapCache->setCacheLimit(cacheConfig().readEntry("ThemeCacheKb", 80 * 1024));
ThemeConfig config;
pixmapCache->setCacheLimit(config.themeCacheKb());
}
return cacheTheme;