From kde-commits Mon Nov 10 20:56:40 2008 From: Maks Orlovich Date: Mon, 10 Nov 2008 20:56:40 +0000 To: kde-commits Subject: branches/KDE/4.1/kdelibs/khtml Message-Id: <1226350600.947660.27232.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122635061003253 SVN commit 882504 by orlovich: Restore the use of a forwarding factory method in khtmlimagepart. This makes this work right with --as-needed. Before this, khtmlimagepart was literally an empty .so, and would rely on linking to libkhtml to get the entry point --- linking which -as-needed would kill, as nothing within module referred to it. M +1 -1 khtmlimage.cpp M +8 -0 khtmlimage_init.cpp --- branches/KDE/4.1/kdelibs/khtml/khtmlimage.cpp #882503:882504 @@ -39,7 +39,7 @@ // Export init_khtmlimagefactory. This way we don't have to export the whole class // just for khtmlimagepart. See khtmlimage_init.cpp -K_EXPORT_COMPONENT_FACTORY(khtmlimagepart, KHTMLImageFactory) +K_EXPORT_COMPONENT_FACTORY( khtmlimagefactory, KHTMLImageFactory ) KComponentData *KHTMLImageFactory::s_componentData = 0; --- branches/KDE/4.1/kdelibs/khtml/khtmlimage_init.cpp #882503:882504 @@ -19,3 +19,11 @@ #include +// Defined in libkhtml +extern "C" KDE_EXPORT void* init_khtmlimagefactory(); + +// The real entry point for khtmlimagepart +extern "C" KDE_EXPORT void* init_khtmlimagepart() { + return init_khtmlimagefactory(); +} +