[PATCH] kcmoduleinfo [WAS] Plugin linking problem

Rafael Fernández López ereslibre at gmail.com
Thu Aug 9 22:53:34 BST 2007

OK you have a plugin in foo.so, and you want to load it as foo.so, so you
removed the

> auto-prepending of "kcm_". Fine. But you said that the reason for doing so
> was that
> foo.so is also a plugin for something else, like a ktexteditor plugin. So
> my question is:
> how can one library ship both one ktexteditor plugin and one kcmodule
> plugin, given that
> (AFAICS) they are all provided by the same C function ("entry point"),
> called init_foo()?
> (or in your example, init_ktexteditor_docwordcompletion). That function
> can either create
> a factory for a ktexteditor plugin OR a factory for a kcmodule plugin, but
> not both (at least
> not with the standard use of the K_EXPORT... macro, it would require the
> use of more elaborate
> kgenericfactory magic to do that, iirc).

Well, as they have different factories, they have different entry points.
That's the thing, both .desktop files provide X-KDE-FactoryName, so each one
enters through that symbol.

Does it really work? Do you have one plugin playing both roles? Please run
> nm on it and grep for init_
> and tell me what you see, if the above is chinese to you :)
> (and tell me how you used K_EXPORT_... and factories)

nah, I don't understand chinese :). It works. Yeah. Here you can find the


Hopefully I'm wrong, but I smell a breakage here.

I hope you're wrong. It is not breaking anything here :)

Rafael Fernández López.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070809/1157d894/attachment.htm>

More information about the kde-core-devel mailing list