From 154f7d0e386707b694b5715962c4bdc166ca56a5 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 7 Oct 2009 18:44:33 +0000 Subject: [PATCH] use the ThemeGlobal kconfigxt class in Theme svn path=/trunk/KDE/kdelibs/; revision=1032413 --- CMakeLists.txt | 2 ++ theme.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) 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;