[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KConfigBase::deleteGroup not working?
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2006-05-27 8:17:01
Message-ID: 200605271017.05776.ogoffart () kde ! org
[Download RAW message or body]
Le Samedi 27 Mai 2006 00:49, Gary Cramblitt a écrit :
> Right now, config->deleteGroup("MyGroup") doesn't delete the group.
>
> This code
>
> bool KConfigBase::deleteGroup( const QString& _group, WriteConfigFlags
> pFlags )
> {
> KEntryMap aEntryMap = internalEntryMap(_group);
>
> if (pFlags & Recursive) {
> // Check if it empty
> return aEntryMap.isEmpty();
> }
>
> doesn't seem to match what the api doc says:
>
> bool KConfigBase::deleteGroup ( const QString & group,
> WriteConfigFlags pFlags = Recursive
> )
>
> Deletes a configuration entry group.
> If the group is not empty and Recursive is not set, nothing gets deleted
> and false is returned.
ineed, the if do the opposed what it should do.
It should be changed to
if( !(pFlags & Recursive) )
But btw, i don't see how this flag is supposed to be usefull.
Maybe one can even remove that flag.
--
Olivier (aka Gof)
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic