Idea: SkipDirtyOnIdenticalValues WriteConfigFlag for KConfigBase / KConfig
Oswald Buddenhagen
ossi at kde.org
Fri May 23 18:29:40 BST 2008
On Fri, May 23, 2008 at 03:00:47PM +0200, Eduardo Robles Elvira wrote:
> The idea is to create my KConfig file with SkipDirtyOnIdenticalValues
> set as WriteConfigFlag, and the problem would be solved.
>
and why exactly would you want to pollute the api with such nonsense? is
there any reason *not* to use it everywhere?
the hard part is finding out whether the entry map was actually modified or
not - its api does not provide that comfort currently.
to do it efficiently, the setter function should obtain a non-const
reference to the entry it writes, check whether it was just created or
existed before (dunno, maybe a flag in the struct) and set the new value
and return true if either the old value was unset or differed.
disclaimer: i haven't looked at that code for months.
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Confusion, chaos, panic - my work here is done.
More information about the kde-core-devel
mailing list