[RFC] KConfig API stuff
Oswald Buddenhagen
ossi at kde.org
Mon Oct 22 10:52:49 BST 2007
On Mon, Oct 22, 2007 at 11:17:58AM +0200, David Faure wrote:
> On Sunday 21 October 2007, Oswald Buddenhagen wrote:
> > make kconfig inherit kconfiggroup.
>
> I object to KConfig inheriting KConfigGroup:
>
> 1) the entries in the root group aren't that important, using them is
> kind of bad practice for actual KDE config files, except special cases
> (kioslaverc).
>
that doesn't mean that the api needs to be intentionally ugly. ugly apis
don't prevent people from doing ugly things, they just make the code
look ugly, including the one that uses the api legitimately.
> 3) let's not be confusing about how to use KConfig. There should be
> one way, and it should work. And that way is: KConfigGroup.
>
that's no contradiction by definition. ;)
> 2) the porting from kde3 will be horrible. Every single kde3 app out
> there, whose code does config.setGroup("foo");
> config.writeEntry("bar","42"), will end up writing into the root group
> without the author wanting that at all.
>
after the hierarchy change setGroup() wouldn't make any sense and
therefore must be removed anyway, so this is a non-issue.
really, it's all about viewing a config as a tree and not as a list.
when you internalize this, the inconsistency in the current api becomes
disgusting.
--
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