This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kwordpart plugin not found

Tags: None
(comma "," separated)
xyfix
Registered Member
Posts
110
Karma
0

kwordpart plugin not found

Tue Jan 19, 2010 4:26 pm
Guys, I get a

KPluginLoader::KPluginLoader: Could not find plugin "kwordpart"


this is my code and substituting kwordpart with katepart works OK which means that my application integrates the katepart in the mainwindow (KParts::MainWindow). I have build the whole koffice 2.1 without any errors and the libkwordpart.so resides in ~/koffice-2.1/src/lib/. Is there a way to make the location clear to the plugin loader?

Code: Select all
KPluginFactory *factory = KPluginLoader("kwordpart").factory();
KParts::ReadWritePart *m_part;

if (factory)
{
  m_part = static_cast<KParts::ReadWritePart *>
                 (factory->create(this, "kwordpart" ));

  if (m_part)
  {
      layout2->addWidget( m_part->widget() );
  }
}
else
{
  return;
}
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 12:34 am
I guess your ~/koffice-2.1/src/lib/ is the koffice build directory, right?
You always need:
a) to install in some prefix the plugins, to be able to find and use them
b) ensure ALL the prefixes where you have kde software/plugins are in the KDEDIRS environment variable; eg. KDEDIRS=/home/myuser/somelocalroot:/usr


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 8:12 am
pinotree,

you're right that is my build directory and now I installed it in ~/koffice-2.1/install. I can see a bin, include, lib and share directory. In the lib directory I can see the libkwordpart.so ( and also in the lib/kde4 directory :? ). I've added the install/lib directory to KDEDIRS ( sourced the bashrc file again and checked the KDEDIRS variable ). But the message still remains the same.
Can you explain me what happens during an install, I assume the libkwordpart.so is the same file in my src directory as in my install directory?
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 10:29 am
xyfix wrote:I've added the install/lib directory to KDEDIRS ( sourced the bashrc file again and checked the KDEDIRS variable ). But the message still remains the same.

Of course, if you set KDEDIRS in the wrong way :) You don't add the lib directories to KDEDIRS, but the installation prefixes.
xyfix wrote:Can you explain me what happens during an install, I assume the libkwordpart.so is the same file in my src directory as in my install directory?

Nothing special, just everything is placed in the correct structure which is used by the kde libraries.


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 12:41 pm
Unfortunately that didn't help. My KDEDIRS reads

/home/user/koffice-2.1/install


what could go wrong I've even rebuilt whole koffice (again without any errors) and did an install. Please advice..... there is not much hair left to pull out anymore. :((
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 2:05 pm
I uninstalled koffice and rebuilt it and installed it again and I saw that libkwordpart only resides in ~/koffice-2.1/install/lib/kde4 and not also in ~/koffice-2.1/install/lib.

I don't know wether this matters but this is what I get for kde-config --path lib :

"/home/user/.kde/lib/:/home/user/koffice-2.1/install/lib/:/opt/kde3/lib/"
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 2:24 pm
Did you run `kbuildsycoca4 --noincremental` after having set KDEDIRS?


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 2:43 pm
just ran it but no success.
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 3:18 pm
Are you running your application from the same console where you export'ed the KDEDIRS environment variable?
Also, note kde-config is for KDE 3 stuff, kde4-config is for KDE 4.
Furthermore, what do you get if in a consol you run:
$ ktraderclient --servicetype 'KParts/ReadWritePart' --constraint "Library == 'libkwordpart'"
?


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 3:27 pm
Indeed I'm running it in the same console ( before starting my app I check wether the variable is properly set )

Also, note kde-config is for KDE 3 stuff, kde4-config is for KDE 4.


OK, thanks for that I didn't know that.

This is the output of the command:
Code: Select all
servicetype is : KParts/ReadWritePart
constraint is : Library == 'libkwordpart'
got 1 offers.
---- Offer 0 ----
Invalid property UntranslatedGenericName
X-KDE-ExtraNativeMimeTypes : 'application/vnd.oasis.opendocument.text-template - application/x-kword'
X-KDE-NativeMimeType : 'application/vnd.oasis.opendocument.text'
X-KDE-NativeOasisMimeType : 'application/vnd.oasis.opendocument.text'
Type : 'Service'
Name : 'KOffice Word Processing Component'
Invalid property Comment
GenericName : 'Text Documents'
Icon : 'kword'
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'KOfficePart - KParts/ReadOnlyPart - KParts/ReadWritePart - application/vnd.oasis.opendocument.text - application/vnd.oasis.opendocument.text-template - application/x-kword - application/msword - application/rtf - text/plain - application/x-mswrite'
AllowAsDefault : 'TRUE'
InitialPreference : '3'
Library : 'libkwordpart'
DesktopEntryPath : 'kwordpart.desktop'
DesktopEntryName : 'kwordpart'
Keywords : ''
Categories : ''


what's with the kwordpart.desktop? I don't recall having one, where should it be located?
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 3:42 pm
Ok, in your code now try:

Code: Select all
KPluginFactory *factory = KPluginLoader("libkwordpart").factory();

instead of

Code: Select all
KPluginFactory *factory = KPluginLoader("kwordpart").factory();

and see whether it makes any difference.


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 3:52 pm
This is what I get:

Code: Select all
myapp(6087)/ findLibraryInternal: plugins should not have a 'lib' prefix: "libkwordpart.so"
myapp(6087)/ findLibraryInternal: plugins should not have a 'lib' prefix: "libkwordpart.so"
myapp(6087)/ kde4Factory: The library "/home/user/koffice-2.1/install/lib/kde4/libkwordpart.so" does not offer a qt_plugin_instance function.
Calling appendChild() on a null node does nothing.


the last message should be ignored if it doesn't ring any bells, that might be unrelated to our error since it's myapp specific.
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 3:59 pm
Nothing else, and always no service being created?
Also try to set the LD_LIBRARY_PATH environemnt variable, adding /yourinstallationprefix/lib to it.


Pino Toscano
xyfix
Registered Member
Posts
110
Karma
0

Re: kwordpart plugin not found

Wed Jan 20, 2010 4:12 pm
The LD_LIBRARY_PATH variable already contained the ~/koffice-2.1/install/lib and the ~/koffice-2.1/install/lib/kde4 directories.
I really appreciate you helping me out, please bear with me. :)
pinotree
KDE Developer
Posts
222
Karma
7
OS

Re: kwordpart plugin not found

Wed Jan 20, 2010 4:16 pm
I'm starting to run out of ideas...
what if you execute kdebugdialog and enable the debug areas 0, 150, and 180, and after that try again your application? Any further debug output?


Pino Toscano


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]