Summary: | KConfig doesn't delete a group until the object is destroyed | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Rui Dias <ruijdias> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | faure, julien.michot.fr, kdelibs-bugs, ossi |
Priority: | NOR | ||
Version: | 4.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6 | |
Sentry Crash Report: | |||
Attachments: | Unit test for this bug |
Description
Rui Dias
2009-05-10 21:23:51 UTC
Created attachment 33529 [details]
Unit test for this bug
Confirmed, already tested by a unittest I added in 2007, but I hadn't realized the inconsistency in that "creating another KConfig shows it as deleted". Definitely a bug. Ok I have a working patch for this, using KEntry::bDeleted for "group marker" entries. Still leaves two TODOs though: - what to do if a group is marked as deleted but has non-deleted entries inside (I guess I need to add code to make sure this does not happen, by clearing bDeleted when writing an entry again in the group) - digging into the test about removing localized entries, which has always failed, but now fails in different ways... SVN commit 1204914 by dfaure: Fix deletion of groups so that a group doesn't exist() after being deleted :-) A group now exists if it has at least one non-deleted entry (including in subgroups). + added unittest for deleting a nested group, and check what gets written to disk. BUG: 192266 FIXED-IN: 4.6 M +54 -32 config/kconfig.cpp M +3 -0 config/kconfig_p.h M +10 -6 config/kconfigdata.h M +8 -3 config/kconfigini.cpp M +32 -2 tests/kconfigtest.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1204914 *** Bug 234654 has been marked as a duplicate of this bug. *** |