[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:36:25
Message-ID: 93f85fee0708091436s2a98fd5bq21727101151eecf0 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hi David,


The main problem was here (at kcmoduleinfo.cpp):

-   if( !lib.startsWith( QLatin1String( "kcm_" ) ) )
-     lib = QLatin1String( "kcm_" ) + lib;

When it tries to load the KCM factory from the library it will fail, because
if the library is " foo.so", it will try to load from "kcm_foo.so", what
won't find.

For that reason I'm removing that as well as this change on the same file:

-  handle = tmp.isValid() ? tmp.toString() :
lib.right( lib.length() - 4 ); // lib without kcm_ prefix
+  handle = tmp.isValid() ? tmp.toString() : lib;

This way what I've been working on is adapting all *.desktop files that had
X-KDE-Library variable without kcm_ on the beginning, and of course, fixing
some .cpp files that hadn't X-KDE-FactoryName on their .desktop files
(because there X-KDE-Library was taken), and as far as it was modified
adding "kcm_", it was needed to add "kcm_" on the
K_EXPORT_COMPONENT_FACTORY.

Everything on kdebase/kdelibs/kdepimlibs (I have checked all I think) works.
I have to fix the rest of modules. kdevplatform and kdevelop were
contributed by apaku, and I just need to search for KCModule on the rest of
*.desktop files on the rest of modules (I don't think they will be too
much).


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

[Attachment #3 (text/html)]

Hi David,<br><br><br>The main problem was here (at kcmoduleinfo.cpp):<br><br>- &nbsp; \
if( !lib.startsWith( QLatin1String( &quot;kcm_&quot; ) ) )<br>- &nbsp; &nbsp; lib = \
QLatin1String( &quot;kcm_&quot; ) + lib;<br><br>When it tries to load the KCM factory \
from the library it will fail, because if the library is &quot; foo.so&quot;, it will \
try to load from &quot;kcm_foo.so&quot;, what won&#39;t find.<br><br>For that reason \
I&#39;m removing that as well as this change on the same file:<br><pre>-  handle = \
tmp.isValid() ? tmp.toString() :  <br>lib.right( lib.length() - 4 ); // lib without \
kcm_ prefix<br>+  handle = tmp.isValid() ? tmp.toString() : lib;</pre>This way what \
I&#39;ve been working on is adapting all *.desktop files that had X-KDE-Library \
variable without kcm_ on the beginning, and of course, fixing some .cpp files that \
hadn&#39;t X-KDE-FactoryName on their .desktop files (because there X-KDE-Library was \
taken), and as far as it was modified adding &quot;kcm_&quot;, it was needed to add \
&quot;kcm_&quot; on the K_EXPORT_COMPONENT_FACTORY. <br><br>Everything on \
kdebase/kdelibs/kdepimlibs (I have checked all I think) works. I have to fix the rest \
of modules. kdevplatform and kdevelop were contributed by apaku, and I just need to \
search for KCModule on the rest of *.desktop files on the rest of modules (I \
don&#39;t think they will be too much). <br><br><br>Bye and thanks,<br>Rafael \
Fernández López.<br>



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

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