[RFC] KConfig API stuff
David Faure
faure at kde.org
Mon Oct 22 10:17:58 BST 2007
On Sunday 21 October 2007, Oswald Buddenhagen wrote:
> make kconfig inherit kconfiggroup.
> - rationale: it is The Right Thing To Do (TM). the current asymmetry
> of kconfig offering the group functions but no entry functions is
> just awkward. the kconfig object itself is the <default> group (the
> root group, or rather, the non-group) and should behave as such.
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).
It's useful when reading key=value files not written out by KDE (without groups)
but those two cases are special enough that they can simply be done with a KConfigGroup group(config,"").
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. Porting KDE SVN is one thing,
but don't forget the hundreds of kde3 apps out there that haven't been ported yet.
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.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list