kdelibs/kdecore

Matthias Kretz kretz at kde.org
Tue Sep 23 20:18:50 BST 2003


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 at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030923/504c4733/attachment.sig>


More information about the kde-core-devel mailing list