use the ThemeGlobal kconfigxt class in Theme
svn path=/trunk/KDE/kdelibs/; revision=1032413
This commit is contained in:
parent
ca63e9647b
commit
154f7d0e38
@ -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)
|
||||
|
12
theme.cpp
12
theme.cpp
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user