aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <ossi@kde.org>2007-10-24 13:08:37 +0000
committerAleix Pol <aleixpol@kde.org>2014-04-26 14:11:15 +0200
commit917f389250c6e426775bd60a6a66bfb54be1051d (patch)
treeaf469b911734c8367f2ab8e2715fdd1725ce899d /src
parent03f5568c55d73c6784ce43ff4ca32af967eac066 (diff)
downloadkconfig-917f389250c6e426775bd60a6a66bfb54be1051d.tar.gz
kconfig-917f389250c6e426775bd60a6a66bfb54be1051d.tar.bz2
KConfig* API overhaul. only cosmetics, so don't panic.
KConfigBase: - remove separator argument from list entry reading/writing functions - introduce {read,write}XdgListEntry() - kill readPathListEntry(), add readPathEntry() overload instead. the default value is not optional any more, as it defines the return type. this is consistent with the readEntry() functions. - rename clean() => markAsClean(), remove rollback() - rename ConfigState => AccessMode, getConfigState() => accessMode() - rename {entry,group}IsImmutable() => is{Entry,Group}Immutable() - remove NLS alias to Localized KConfig: - remove setGroup() & group() - reshuffle OpenFlag enum, introduce NoCascade for symmetry - remove setExtraConfigFiles() alias to addConfigSources() KConfigGroup: - inherit KConfigBase::deleteGroup() overloads - make convertToQVariant() private, it will probably change somehow - KConfig & KConfigGroup: deprecate entryMap() - remove bogus declarations: KConfigGroup::setReadDefaults(), KConfig::readEntryUntranslated() - apidox - reshuffle the declarations in the headers svn path=/trunk/KDE/kdebase/runtime/; revision=728852
Diffstat (limited to 'src')
-rw-r--r--src/kreadconfig/kreadconfig.cpp2
-rw-r--r--src/kreadconfig/kwriteconfig.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/kreadconfig/kreadconfig.cpp b/src/kreadconfig/kreadconfig.cpp
index 329f7b05..915c0967 100644
--- a/src/kreadconfig/kreadconfig.cpp
+++ b/src/kreadconfig/kreadconfig.cpp
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
konfig = KGlobal::config().data();
else
{
- konfig = new KConfig( file, KConfig::CascadeConfig );
+ konfig = new KConfig( file, KConfig::NoGlobals );
configMustDeleted=true;
}
KConfigGroup cfgGroup = konfig->group(group);
diff --git a/src/kreadconfig/kwriteconfig.cpp b/src/kreadconfig/kwriteconfig.cpp
index 23a4ffa4..2a3be11a 100644
--- a/src/kreadconfig/kwriteconfig.cpp
+++ b/src/kreadconfig/kwriteconfig.cpp
@@ -52,12 +52,12 @@ int main(int argc, char **argv)
KConfig *konfig;
if (file.isEmpty())
- konfig = new KConfig(QString::fromLatin1( "kdeglobals"), KConfig::CascadeConfig );
+ konfig = new KConfig(QString::fromLatin1( "kdeglobals"), KConfig::NoGlobals );
else
- konfig = new KConfig( file, KConfig::CascadeConfig );
+ konfig = new KConfig( file, KConfig::NoGlobals );
KConfigGroup cfgGroup = konfig->group(group);
- if ( konfig->getConfigState() != KConfig::ReadWrite || cfgGroup.entryIsImmutable( key ) ) return 2;
+ if ( konfig->accessMode() != KConfig::ReadWrite || cfgGroup.isEntryImmutable( key ) ) return 2;
if(type=="bool") {
// For symmetry with kreadconfig we accept a wider range of values as true than Qt