[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kdelibs/kdecore
From:       Matthias Kretz <kretz () kde ! org>
Date:       2003-09-23 19:18:50
[Download RAW message or body]


On Tuesday September 23 2003 17:11, Waldo Bastian wrote:
> On Tuesday 23 September 2003 11:42, Matthias Kretz wrote:
> > On Tuesday September 23 2003 11:19, Waldo Bastian wrote:
> > > Maybe KConfig should
> > > provide a factory for refcounted config objects for such cases?
> >
> > Yes, that would be great. The same problem happens with embedding KCMs in
> > your app. The KCM cannot reuse the KConfig object (because
> > KGlobal::config() is not always the right config object and if you want
> > to keep the flexibility to load the KCM somewhere else using
> > KGlobal::config() in a KCM is a no-no). So it would be good to get the
> > same KConfig object as is used in the application if the KCM is loaded
> > in-process, else keeping sync is a mess.
>
> Please review the following patch.

I'm still missing that factory... something like

KConfigFactory::getKConfigObjectFor( const QCString & instancename );

This is needed because in the KCModule one cannot access the KInstance object 
of the KPart or plugin to get the KConfig object, but the internal name of 
the KInstance is known.

(I used QCString because that's what's used for the KInstance name.)

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                          <><
http://Vir.homeip.net/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic