make KLibrary's kde3Factory behave like kde4Factory

Maksim Orlovich mo85 at cornell.edu
Thu Oct 11 15:45:58 BST 2007


> 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.






More information about the kde-core-devel mailing list