[PATCH]: deleteGroup deletes sub groups too

Aaron J. Seigo aseigo at kde.org
Sat Dec 1 23:58:33 GMT 2007


hi all ..

here is a patch to fix deleteGroup such that it deletes not only the keys in 
that group but also all subgroups. the patch also extends the kconfigtest 
unit test to confirm that this works as expected, including on grandchildren 
groups.

it's non-recursive, but has a nested for loop (one for the groups, one for the 
keys in a group). it does duplicate a small bit of code from groupList though 
this is to make it more efficient (it prevents a bunch of subtring-ing only 
to put them back together again later as well as multiple calls to groupList 
which goes through *all* keys each time).

ok to commit?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delete_subgroups_too.diff
Type: text/x-diff
Size: 2802 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071201/b8840eee/attachment.diff>
-------------- 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/20071201/b8840eee/attachment.sig>


More information about the kde-core-devel mailing list