[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] kcmoduleinfo [WAS] Plugin linking problem
From:       "=?UTF-8?Q?Rafael_Fern=C3=A1ndez_L=C3=B3pez?=" <ereslibre () gmail ! com>
Date:       2007-08-09 21:53:34
Message-ID: 93f85fee0708091453m52b60b3w65081262ce751688 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

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
code:

http://media.ereslibre.es/2007/08/wordcompletion.tar.gz

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


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


Bye,
Rafael Fernández López.

[Attachment #3 (text/html)]

<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 &quot;kcm_&quot;. 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 (&quot;entry point&quot;), 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&#39;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&#39;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&#39;m wrong, \
but I smell a breakage here.</blockquote><div><br>I hope you&#39;re wrong. It is not \
breaking anything here :)<br clear="all"></div></div><br><br>Bye,<br>Rafael \
Fernández López.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic