KConfigBase::deleteGroup not working?
Olivier Goffart
ogoffart at kde.org
Sat May 27 09:17:01 BST 2006
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060527/57f46370/attachment.sig>
More information about the kde-core-devel
mailing list