diff --git a/CMakeLists.txt b/CMakeLists.txt index 02c37d8da..75cd3ef26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/theme.cpp b/theme.cpp index 2cb2a2ff6..7ae634a51 100644 --- a/theme.cpp +++ b/theme.cpp @@ -42,6 +42,7 @@ #include #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;