Review Request: Prevent KConfigGroup::revertToDefault from marking the kconfig as dirty if there's nothing to do
David Faure
faure at kde.org
Thu Nov 17 15:41:25 GMT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103168/
-----------------------------------------------------------
(Updated Nov. 17, 2011, 3:41 p.m.)
Review request for kdelibs, Thomas Braxton and Oswald Buddenhagen.
Description
-------
KConfig marks an entry as dirty even when calling revertToDefault (which doesn't write out anything if there is no entry in the local config file). In theory this could be fixed inside the big KEntryMap::setEntry method in kconfigdata.h, but that code is way too obscure and fragile for my eyes. This simpler fix seems to do the job, unless I'm missing something.
Once my review request for KConfig::isDirty is merged in, this could even be unit-tested... I can do that, but I would really like input on 1) a possible better/faster implementation, 2) the actual expected behavior of revertToDefault in all cases (value in global config file, no value in global config file.... hmm I guess in all cases all we want is no value in the local file, right?)
Diffs
-----
kdecore/config/kconfiggroup.cpp 9e73eb7
Diff: http://git.reviewboard.kde.org/r/103168/diff/diff
Testing
-------
Thanks,
David Faure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111117/0622c5e2/attachment.htm>
More information about the kde-core-devel
mailing list