KConfig hierarchy redesign

Tobias Koenig tokoe at kde.org
Mon Apr 10 10:56:33 BST 2006


the current KConfig inheritance hierarchy seem broken to me and maybe we
should change it now, so when the application developer start to port
their stuff they can use the new concept already.

The current state is

  + - KConfig
  |    |
  |    + - KSimpleConfig
  |    |
  |    + - KSharedConfig
  + - KConfigGroup

The disadvantages I see with this concept are:

 - KConfig pointers are used everywhere in KDE, so you can't pass
   a KConfigGroup pointer there, also it's meant to be used as decorator
 - Using KConfigBase everywhere seems a bit odd because of the strange
 - Coolo mentioned on IRC that a prefered way could be to hide KConfig
   completely and use KConfigGroup everywhere instead

So maybe the following redesign could help a bit

 KConfig (merged with KConfigBase)
  + - KSimpleConfig
  + - KSharedConfig
  + - KConfigGroup

Since except of KConfig only KConfigGroup inherits from KConfigBase, and
that seems to be the wrong approach, why not merging these two classes
to a KConfig?

I'm not a KConfig guru, just a developer who doesn't like the current
API, so maybe somebody with more knowledge could comment on it?

Separate politics from religion and economy!
The Councile of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060410/ada36fae/attachment.sig>

More information about the kde-core-devel mailing list