make KLibrary's kde3Factory behave like kde4Factory
Matthias Kretz
kretz at kde.org
Thu Oct 11 15:58:49 BST 2007
On Thursday 11 October 2007, Maksim Orlovich wrote:
> > On Tuesday 09 October 2007, Matthias Kretz wrote:
> >> attached you'll find a patch that makes kde3Factory (helper function of
> >> KLibrary) behave the same as kde4Factory does, i.e.:
> >> - create new KPluginFactory instance if called the first time
> >> - return a pointer to the old KPluginFactory object if called a second
> >> time
> >> - when the KPluginFactory object is deleted, create it anew
> >> This restores the old behaviour we had with KLibLoader/KLibrary.
> >>
> >> Please review and let me know whether I should commit.
> >
> > Hi again,
> >
> > I won't commit this without comments, but here's a different idea how to
> > solve
> > it: instead of storing the QPointer with kde3Factory in a K_GLOBAL_STATIC
> > QHash we do it like Q_PLUGIN_INSTANCE in K_EXPORT_COMPONENT_FACTORY, i.e.
> > change
>
> <snip>.
>
> That's not backwards compatible, though, and can fail silently, if the
> factory is hand-made.
Right. In KDE3 KLib* had the logic to make sure only one instance was created.
So yes, I agree to rather use the top post patch than to modify
K_EXPORT_COMPONENT_FACTORY.
--
________________________________________________________
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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071011/d1fc6beb/attachment.sig>
More information about the kde-core-devel
mailing list