KConfigGroup (Re: KDE/kdelibs/khtml)

Aaron J. Seigo aseigo at kde.org
Sun Feb 11 22:00:33 GMT 2007


On February 11, 2007, Ingo Klöcker wrote:
> On Saturday 10 February 2007 23:54, David Faure wrote:
> > On Friday 09 February 2007, Aaron J. Seigo wrote:
> > >  - a method in KConfig that returns a KConfigGroup object
> >
> > Does this change anything?
> >   KConfigGroup group = KGlobal::config()->configGroup("bar");
> > instead of
> >   KConfigGroup group = KConfigGroup( KGlobal::config(), "bar" );
> > ?
> > Can't see much improvement (only more object copying).
>
> [snip]
>
> > > perhaps even KConfigGroup(const QString& group) to shortcut this
> > > idiom: KConfigGroup group(KGlobal::config(), "bar");
> >
> > would become KConfigGroup group("bar")... Hmm. A bit too much hidden
> > magic to my taste but I guess it makes the simple case (kmyapp) a bit
> > simpler. So I guess I'm ok with that one.
>
> What about
>   KConfigGroup group = KGlobal::configGroup("bar") ?
>
> It's longer than KConfigGroup("bar"), but avoids the hidden magic.

mm. yeah, that's even better imho.


-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070211/9f2e1a2d/attachment.sig>


More information about the kde-core-devel mailing list