Idea: SkipDirtyOnIdenticalValues WriteConfigFlag for KConfigBase / KConfig

Matthew Woehlke mw_triad at
Tue Jul 15 00:44:08 BST 2008

Oswald Buddenhagen wrote:
> On Mon, Jul 14, 2008 at 11:16:39AM -0500, Matthew Woehlke wrote:
>> Oswald Buddenhagen wrote:
>>> On Fri, Jul 11, 2008 at 04:02:25PM -0500, Matthew Woehlke wrote:
>>>> writeEntry(value, default) -- don't write if current is empty and
>>>> value==default, otherwise as above
>>> .... default obviously being cascaded with the system configs.  makes
>>> sense.
>> Hmm, sure. Maybe "don't write if read(<default>) would give <default>"
>> is more correct?
...and if value==default (forgot that!)

> almost: what if there is currently a local value written which matches
> the default? i think it would be deleted, which is not covered by this
> version. you can fix that by substituting "write" with Something Else
> (TM).

No, write is not destructive. If the entry already contains 'value', the 
write(v,d) call is a no-op. It doesn't change dirty, it doesn't delete 
the value already there. Why should it be deleted?

Thus sang the fat lady...

More information about the kde-core-devel mailing list