Idea: SkipDirtyOnIdenticalValues WriteConfigFlag for KConfigBase / KConfig
Eduardo Robles Elvira
edulix at gmail.com
Fri Jul 11 22:29:41 BST 2008
El Viernes 11 Julio 2008, Matthew Woehlke escribió:
> I know I'm about a month late here, but this is exactly a problem that
> exists in kate(part), that I was expecting to (eventually, whenever I
> actually got around to fixing it) have to fix by implementing this sort
> of logic in kate. Although, I think in kate's case what we really want
> to do is fix the granularity on our own dirty, so that we don't even
> call writes unless something has been changed.
> Specifically, the issue in kate is that it should not write the scheme
> colors until you actually change one of them, so that if you don't
> fiddle with them, they stay in sync with the system color scheme.
> Currently if you change *anything* (e.g. indent, show line numbers) the
> colors get written also :-(.
> But, it's an example of what dfaure is pointing out, there are times
> when you want to write the value regardless (in fact, kate will get VERY
> screwed up if it doesn't write out the entire colors, even if most are
> still "default"), and times when if it hasn't changed, you want it to
> remain unset.
> What might work is:
> writeEntry(value) -- always writes if empty, don't set dirty if
> unchanged (same as current behavior I think, sans gratuitous dirtying?)
> writeEntry(value, default) -- don't write if current is empty and
> value==default, otherwise as above
> The latter is especially needed because the default may not be constant
> (e.g. kate defaults are related to the current system color scheme)
I think that what you propose seems is a good idea. If others agree, I will
try to to develop a patch following that proposal soon enough
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." (George Bernard Shaw)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel