[RFC] KConfig API stuff
Oswald Buddenhagen
ossi at kde.org
Tue Oct 23 21:42:47 BST 2007
On Tue, Oct 23, 2007 at 03:31:13PM +0200, David Faure wrote:
> On Monday 22 October 2007, Oswald Buddenhagen wrote:
> > the old code will simply not compile, just like it does now. this
> > also makes the "kde3 experience" argument fall flat.
>
> Take this kde3 code:
> config.setGroup("foo");
> config.writeEntry("bar",42);
>
> Upon getting a compilation error with setGroup and a hint about
> KConfigGroup in the documentation, the person doing kde3->kde4 porting
> will write
> KConfigGroup cg(&config,"foo");
> config.writeEntry("bar",42);
>
> Why touch the second line, it compiles fine as it is now. [...]
>
i wouldn't have believed this to be possible, but what i've seen on my
current crusade against setGroup makes even this scenario a radical
understatement of actual stupidity.
> You mentionned that this was kde5 material - in that case it's
> completely different; there won't be such kde3 code around to be
> ported to that future KConfig API directly, so the problem won't
> happen; kde4 will have cleaned up the code meanwhile.
>
ok, so we'll re-iterate this issue in ~5 years, hopefully the proposal
will meet less resistance.
> > > There is no special case in the sentence "you need a group to be able
> > > to read and write".
> > >
> > there is a special case in the sentence "you need as many groups as
> > deeply as your hierarchy is nested, but wait, you still need a group
> > when you want to access the root level".
>
> Yes, so don't phrase it like that :-)
>
well, any applicable interpretation of the situation should be
considered, not only those you like. ;)
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the kde-core-devel
mailing list