[PATCH] Simplify plugin writing
Will Stephenson
wstephenson at kde.org
Mon Nov 5 16:00:58 GMT 2007
When defining a plugin we use K_PLUGIN_FACTORY and K_EXPORT_PLUGIN macros to
define its plugin factory and export it as a plugin. K_EXPORT_PLUGIN is
defined in kpluginloader.h. I find #including this counterintuitive as a
plugin author, and the compiler error when this is omitted had me mystified.
The attached patch simplifies plugin definition to just #include
<kpluginfactory.h> and using the macros, by moving the definition of
K_EXPORT_PLUGIN to a separate file, kexportplugin.h, which is included from
both *loader and *factory headers. I have rebuilt kdelibs and kopete with
this change and both build correctly; is anyone aware of more subtle use of
plugins that it may break?
Will
--
Will Stephenson
IRC: Bille
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplify_plugin_definition.diff
Type: text/x-diff
Size: 5215 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071105/6c8dcce8/attachment.diff>
More information about the kde-core-devel
mailing list