[RFC] KConfigBase v KConfig
Thomas Braxton
brax108 at cox.net
Fri Nov 4 14:38:11 GMT 2005
On Friday 04 November 2005 08:11 am, Dominik Haumann wrote:
> On Friday 04 November 2005 14:47, Thomas Braxton wrote:
> > On Friday 04 November 2005 07:13 am, Stephan Kulow wrote:
> > > I sure hope we will change all public uses to KConfigGroup and leave
> > > the kconfig objects to some setup functions - where KConfig usually
> > > makes more sense.
> >
> > The only places KConfig should ever show up is where the file is opened,
> > everywhere else it should be a KConfigBase.
> >
> > > If you ask to change every use of KConfig to use KConfigGroup: yes, go
> > > for it!
> > >
> > > Greetings, Stephan
> >
> > Why would we change to KConfigGroup? I was talking about the classes that
> > have a function like KConfig* SomeClass::config(), should return a
> > KConfigBase*. Or a function like void SomeClass::readSettings(KConfig
> > *config), should pass in a KConfigBase*. It could be a pointer to a
> > KConfigGroup or a KConfig changed to the correct group, the readSettings
> > function wouldn't care, as long as it gets its entries.
>
> Maybe rename
> - KConfigBase -> KConfig
> - KConfig -> KFileConfig
> as that's what it is supposed to be imo. Then KConfig could be used for all
> arguments.
KConfig should probably be renamed KConfigINI, the backend is called
KConfigINIBackend.
> Only problem is the *lot of* work to do it, also very confusing if a class
> suddenly does something else. otoh: it's KDE4 and the right time to fix
> such things ;)
Actually it might be easier to do it this way, would have to change 4 files
kconfigbase.{cpp,h} and kconfig.{cpp,h}.
Rename kconfig.{cpp,h} to kconfigini.{cpp,h} and rename KConfig to KConfigINI.
Rename kconfigbase.{cpp,h} to kconfig.{cpp,h} and rename KConfigBase to
KConfig.
Then the hard part change all uses of KConfigBase to KConfig. It seems it
would be easier this way, according to lxr.kde.org 3500 KConfigBase vs 27000+
KConfig .
More information about the kde-core-devel
mailing list