[patch] KPluginInfo's use of KConfig

Matthias Kretz kretz at kde.org
Wed Jun 20 11:21:55 BST 2007


On Wednesday 20 June 2007, Andreas Pakulat wrote:
> On 20.06.07 10:57:11, Matthias Kretz wrote:
> > Hi,
> >
> > while looking into KSettings::Dialog and friends in libkutils I stumbled
> > over KPluginInfo's use of KConfig in it's API. Now that KConfigGroup has
> > grown up I'd like to use KConfigGroup exclusively in the KPluginInfo API.
> >
> > Also, since KConfigGroup is a value based class now (it was explicitly
> > shared already) I'd like to add a default ctor + isValid() function so
> > that those can be used like a null pointer or that it can be used with
> > QList and such at all. While at it I replaced the d-pointer with a
> > QExplicitlySharedDataPointer so that copying and deleting the object is
> > safe from any thread.
>
> Do I understand correctly that I can then create a KConfigGroup and use
> that in multiple threads simultanously? That would be awesome because it
> would solve our config-access-problem in KDevelop :)

Sadly not. With this change you're then allowed to copy KConfigGroup objects 
and let them go out of scope without protecting that with a mutex. Everything 
else still is handled by the non-threadsafe KConfig objects. :(

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
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: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070620/85f1b93d/attachment.sig>


More information about the kde-core-devel mailing list