KConfig API changes merged

Matt Rogers mattr at kde.org
Thu Oct 25 01:39:18 BST 2007


On Oct 24, 2007, at 8:47 AM, Oswald Buddenhagen wrote:

> moin,
>
> the release dude said was pro and nobody objected, so i did it. heh.
>
> a few notes:
> - KDE/, extragear/ and koffice/ are ported and test-compiled, but i
>   suppose my installation does not compile everything, so some things
>   might be still broken. ping me on irc if the dashbot complains.
> - there are some uses of {read,write}XdgListEntry() that should not  
> be.
>   go and fix them if you want your code to work with alternative  
> KConfig
>   backends. ps: don't be tempted to just use split()/join() (*) - i  
> already
>   adjusted the cases where this was possible.
> - the porting from setGroup()/group() *might* have broken some cases,
>   but otoh i also fixed quite some porting bugs, so i do at least a
>   break-even. :=)
> - rdale: i did not touch kdebindings - i have no idea if something/ 
> what
>   needs to be done.
> - laurent: for your porting scripts:
>
> trivial:
>
> 's/\bentryIsImmutable\b/isEntryImmutable/g;'\
> 's/\bgroupIsImmutable\b/isGroupImmutable/g;'\
> 's/\bgetConfigState\b/accessMode/g;'\
> 's/\bConfigState\b/AccessMode/g;'\
> 's/\b(KConfigGroup|KConfig|KConfigBase)::NLS\b/\1::Localized/g;'\
> 's/\bKConfig::OnlyLocal\b/KConfig::SimpleConfig/g;'
>
> complex. these are confused by nested parentheses, but as i had to
> review the changes anyway, i didn't bother crafting recursive  
> regexps -
> i can help you with that if you want more sophistication:
>
> 's/\breadPathEntry(\s*)\(([^,)]+?)(\s*)\)/readPathEntry\1(\2,  
> QString()\3)/g;'\
> 's/\breadPathListEntry(\s*)\(([^,)]+,[^,)]+)\)/readPathEntry\1(\2)/ 
> g;'\
> 's/\breadPathListEntry(\s*)\(([^,)]+?)(\s*)\)/readPathEntry\1(\2,  
> QStringList()\3)/g;'
>
> (*) in fact, i surrendered to the temptation, too. :)
> i changed two cases (in cervisia and kcachegrind) that did use a
> non-standard separator other than the semicolon to trivial
> joining/splitting. this needs to be changed to "native" lists (and a
> kconf_update script written, if you care) or custom handling (with
> separator escaping) needs to be written (this can be borrowed from
> KConfigGroup).
>
> On Wed, Oct 24, 2007 at 01:08:45PM +0000, Oswald Buddenhagen wrote:
>> SVN commit 728852 by ossi:
>>
>> 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
>>
>

Why did this not wait until Monday?
--
Matt






More information about the kde-core-devel mailing list