Pages : 1
#1 Le 25/06/2008, à 10:37
- miraks
[résolu] plugin introuvables
Bonjour,
Je suis sous Kubuntu 8.04 et j'utilise KDE 3.5.9.
Je suis en train de développer une application pour KDE 4, j'essaye de mettre en place un mécanisme de plugin.
Pour cela, j'ai crée un fichier skrooge-plugin.desktop contenant:
[Desktop Entry]
Name=Skrooge plugin
Comment=Skrooge plugin
Encoding=UTF-8
Icon=skrooge
Type=ServiceType
X-KDE-ServiceType=Skrooge/Plugin
Ainsi qu'un fichier skrooge-plugin-debug.desktop contenant:
[Desktop Entry]
Name=Skrooge debug plugin
Comment=A skrooge plugin helping debug
Encoding=UTF-8
Icon=skrooge
Type=Service
X-KDE-ServiceTypes=Skrooge/Plugin
X-KDE-Library=skrooge_debug
X-Krunner-ID=Skrooge debug plugin
X-KDE-PluginInfo-Author=Stephane MANKOWSKI
X-KDE-PluginInfo-Name=skrooge_debug
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Category=Plugins
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
Voici certaines parties importante de mes CmakeCache.txt:
install(FILES skrooge-plugin-debug.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES skrooge-plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
Lorsque, je fais un "sudo make install", je constate que le fichier desktop s'installent comme cela:
Install the project...
-- Install configuration: "DEBUG"
...
...
-- Installing /usr/local/share/applications/kde4/skrooge.desktop
...
...
-- Installing /usr/local/share/kde4/servicetypes/skrooge-plugin.desktop
...
...
Voici enfin, mon problème, lorsque je recherche les plugins avec le code suivant:
KService::List offers=KServiceTypeTrader::self()->query(QLatin1String("Skrooge/Plugin"));
int nb=offers.count();
cout << nb << " plugins found" << endl;
je ne les trouves pas.
Pourquoi ? Je craque !
Par avance, merci pour votre aide.
Dernière modification par miraks (Le 30/06/2008, à 07:36)
Hors ligne
#4 Le 30/06/2008, à 07:35
- miraks
Re : [résolu] plugin introuvables
C'est bon, j'ai trouvé, il ma suffit de faire:
sudo ln -s /usr/local/share/kde4/servicetypes/skrooge-plugin.desktop /usr/lib/kde4/share/kde4/servicetypes/.
sudo ln -s /usr/local/share/kde4/services/skrooge-plugin-debug.desktop /usr/lib/kde4/share/kde4/services/.
kbuildsycoca4
Hors ligne
Pages : 1