<span class="gmail_quote"></span><div>OK you have a plugin in foo.so, and you want to load it as foo.so, so you removed the<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
auto-prepending of "kcm_". Fine. But you said that the reason for doing so was that<br>foo.so is also a plugin for something else, like a ktexteditor plugin. So my question is:<br>how can one library ship both one ktexteditor plugin and one kcmodule plugin, given that
<br>(AFAICS) they are all provided by the same C function ("entry point"), called init_foo()?<br>(or in your example, init_ktexteditor_docwordcompletion). That function can either create<br>a factory for a ktexteditor plugin OR a factory for a kcmodule plugin, but not both (at least
<br>not with the standard use of the K_EXPORT... macro, it would require the use of more elaborate<br>kgenericfactory magic to do that, iirc).</blockquote><div><br>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. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does it really work? Do you have one plugin playing both roles? Please run nm on it and grep for init_
<br>and tell me what you see, if the above is chinese to you :)<br> (and tell me how you used K_EXPORT_... and factories)</blockquote><div><br>nah, I don't understand chinese :). It works. Yeah. Here you can find the code:
<br><br><a href="http://media.ereslibre.es/2007/08/wordcompletion.tar.gz">http://media.ereslibre.es/2007/08/wordcompletion.tar.gz</a> <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hopefully I'm wrong, but I smell a breakage here.</blockquote><div><br>I hope you're wrong. It is not breaking anything here :)<br clear="all"></div></div><br><br>Bye,<br>Rafael Fernández López.