[patch] a (temp?) fix for unexpected behaviour of KService::createInstance() on Windows

Jarosław Staniek js at iidea.pl
Sun Mar 2 16:02:35 GMT 2008

Attached a (temp?) patch for unexpected behaviour of 
KService::createInstance() on Windows.

The problem was that the lines:

  KPluginLoader pluginLoader(*this);
  KPluginFactory *factory = pluginLoader.factory();

resulted with factory==0 for the first call, while another call worked well.
People reported that on various windows (xp, vista) and builds (msvc, mingw).
It was also possible that you execute an app for the first time, and 
factory==0 (thus plugins, say, in KDE-PIM refused to load), then execute the 
app again and factory is !=0.

This is all I can have as a temporary solution for now. Feel free to improve - 
hopefully at KPluginLoader level itself. I wasn't able to fix at KPluginLoader 
inherits directly from QPluginLoader, so the ctor itself would have to be 
executed twice...

regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kservice.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080302/dd750337/attachment.ksh>

More information about the kde-core-devel mailing list