[PATCH] kcmoduleinfo [WAS] Plugin linking problem

Rafael Fernández López ereslibre at gmail.com
Fri Aug 10 12:48:50 BST 2007


Hi,


> Yes, one could probably say that kdepim is the reason X-KDE-FactoryName
> exists.

Ah, nice :)

> The right solution IMHO would be to have still one entry point though that
> returns one factory object but this one factory then creates the X different
> KCMs.

Well, is not only about KCMs, but yes... is another option, but I find
it a bit strange.

> Somehow it sounds wrong to me to have one library with X different
> factories to instantiate a plugin class.
> Anyway, I implemented a solution for KCMs:
> http://api.kde.org/4.0-api/kdelibs-apidocs/kutils/html/classKCModuleFactory.html
> Perhaps this should be a general KLibFactory feature though?

For me it sounds normal exporting different functions on a plugin or a
library. For that reason is so, I mean, is something the language
provides, and why not use it. If the factories name are differents
this provides a really nice way of having libraries or plugins or
whatever very well organized. See below.

> Regarding your original problem, I think what you need is this:
>
> libfoo
> plugin_foo linking to libfoo
> kcm_foo linking to libfoo

This is too much overkilling IMHO. I think that we are ready to
provide in a library different entry points in a very clean way. This
is very over-engineering the stuff for wanting to add a config dialog
(in a KCModule) for a plugin. Very hard. I wanted this to be far
easier, and this sounds too much overkilling, and what's worse, we are
installing 3 files (when we could be installing 1), and the benefits
are near to 0.

Simon, just for knowing what to do. Should I revert my local changes,
or can I commit them ?


Bye and thanks,
Rafael Fernández López.


More information about the kde-core-devel mailing list