[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kde4_kconfig
From: Thomas Braxton <brax108 () cox ! net>
Date: 2006-11-26 0:28:21
Message-ID: 1164500901.995317.12845.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 607863 by braxton:
small changes to fix compile
M +1 -4 kglobalsettings.cpp
M +1 -1 kglobalsettings.h
M +1 -1 knotifyclient.cpp
M +20 -26 kservice/kplugininfo.cpp
M +1 -1 kservice/kplugininfo.h
M +1 -2 kservice/kservice.cpp
--- branches/work/kde4_kconfig/kglobalsettings.cpp #607862:607863
@@ -18,10 +18,8 @@
#include <config.h>
#include "kglobalsettings.h"
+#include "ksimpleconfig.h"
-#include <kconfig.h>
-#include <ksimpleconfig.h>
-
#ifdef Q_WS_WIN
#include <windows.h>
#include "qt_windows.h"
@@ -43,7 +41,6 @@
#include "kclipboard.h"
//#include "../kdeui/util/kglobalaccel.h"
#include "kstaticdeleter.h"
-#include "kconfig.h"
#include <qcolor.h>
#include <qcursor.h>
--- branches/work/kde4_kconfig/kglobalsettings.h #607862:607863
@@ -36,7 +36,7 @@
#define KDE_DEFAULT_BUTTON_LAYOUT 0
#define KDE_DEFAULT_SHADE_SORT_COLUMN true
-class KConfigBase;
+class KConfig;
class KUrl;
class QColor;
--- branches/work/kde4_kconfig/knotifyclient.cpp #607862:607863
@@ -295,7 +295,7 @@
instances()->push(this);
KConfigGroup cg( instance->config(), "General" );
- d->useSystemBell = cg.readEntry("UseSystemBell", QVariant(false )).toBool();
+ d->useSystemBell = cg.readEntry("UseSystemBell", false);
}
KNotifyClient::Instance::~Instance()
--- branches/work/kde4_kconfig/kservice/kplugininfo.cpp #607862:607863
@@ -60,8 +60,7 @@
bool enabledbydefault;
bool pluginenabled;
- KConfig * config;
- QString configgroup;
+ KConfigGroup * config;
KService::Ptr service;
QList<KService::Ptr> kcmservices;
bool kcmservicesCached;
@@ -270,8 +269,7 @@
void KPluginInfo::setConfig( KConfig * config, const QString & group )
{
- d->config = config;
- d->configgroup = group;
+ d->config = new KConfigGroup(config, group);
}
KConfig * KPluginInfo::config() const
@@ -279,9 +277,9 @@
return d->config;
}
-const QString & KPluginInfo::configgroup() const
+QString KPluginInfo::configgroup() const
{
- return d->configgroup;
+ return d->config->group();
}
QVariant KPluginInfo::property( const QString & key ) const
@@ -300,35 +298,31 @@
void KPluginInfo::save( KConfigGroup * config )
{
kDebug( 703 ) << k_funcinfo << endl;
- if( 0 == config )
- {
- if( 0 == d->config )
- {
- kWarning( 703 ) << "no KConfigGroup, cannot save" << endl;
- return;
- }
- d->config->setGroup( d->configgroup );
- d->config->writeEntry( d->pluginName + "Enabled", isPluginEnabled() );
+
+ if (!config)
+ config = d->config;
+
+ if( !config ) {
+ kWarning( 703 ) << "no KConfigGroup, cannot save" << endl;
+ return;
}
- else
- config->writeEntry( d->pluginName + "Enabled", isPluginEnabled() );
+
+ config->writeEntry( d->pluginName + "Enabled", isPluginEnabled() );
}
void KPluginInfo::load( KConfigGroup * config )
{
kDebug( 703 ) << k_funcinfo << endl;
- if( 0 == config )
- {
- if( 0 == d->config )
- {
+
+ if (!config)
+ config = d->config;
+
+ if( !config ) {
kWarning( 703 ) << "no KConfigGroup, cannot load" << endl;
return;
- }
- d->config->setGroup( d->configgroup );
- setPluginEnabled( d->config->readEntry( d->pluginName + "Enabled", \
isPluginEnabledByDefault() ) ); }
- else
- setPluginEnabled( config->readEntry( d->pluginName + "Enabled", \
isPluginEnabledByDefault() ) ); +
+ setPluginEnabled( config->readEntry( d->pluginName + "Enabled", \
isPluginEnabledByDefault() ) ); }
void KPluginInfo::defaults()
--- branches/work/kde4_kconfig/kservice/kplugininfo.h #607862:607863
@@ -282,7 +282,7 @@
* @return The groupname used in the KConfig object for load()ing and
* save()ing whether the plugin is enabled.
*/
- const QString & configgroup() const;
+ QString configgroup() const;
/**
* Save state of the plugin - enabled or not. This function is provided
--- branches/work/kde4_kconfig/kservice/kservice.cpp #607862:607863
@@ -35,7 +35,6 @@
#include <kauthorized.h>
#include <kdebug.h>
#include <kdesktopfile.h>
-#include "kconfigdata.h"
#include <kglobal.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -87,7 +86,7 @@
bool absPath = !QDir::isRelativePath(entryPath());
- QMap<QString, QString> entryMap = config->entryMap(config->group());
+ QMap<QString, QString> entryMap = config->entryMap();
entryMap.remove("Encoding"); // reserved as part of Desktop Entry Standard
entryMap.remove("Version"); // reserved as part of Desktop Entry Standard
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic