Tips on developing KRunner plug-ins (with Qt Creator?)

David Edmundson david at davidedmundson.co.uk
Sun Jul 10 20:58:30 UTC 2016


On Sun, Jul 10, 2016 at 3:31 PM, Giacomo Alzetta <giacomo.alzetta at gmail.com>
wrote:

> No, I dont, see the last line in mytestrunner.cpp:
> https://github.com/Bakuriu/MyTestRunner/blob/master/mytestrunner.cpp#L64
>
> You're right.


> And this is exactly the thing that puzzles me. If I put the .desktop file
> in place but I do not provide the .so library, I can see the KRunner load
> stating that it is unable to find the plug-in. When the .so library is in
> place no logging is produced to know whether it succesfully loaded the
> plugin or not, and the plugin isn't called when matching nor is listed in
> the configuration options.
>
> that other file is automatically created by QtCreator, i just left it
> there but I know it's not required.
>


You might find you need CONFIG+=plugin in qmake?

If you want to debug library loading further, run "nm" on both your lib and
an existing one and see what's different.

However, QtCreator can open cmake projects in new versions. You'll save
yourself a lot of trouble if you just use that. It's easier to copy, paste
existing runners and we have lots of KDE specific macros for doing complex
things.

Finally LIBRARY_DIR="$(kf5-config --qt-plugins)" is technically wrong
(though from what you've said seems to work in your case) you're not making
a plugin for Qt.



>
>
> Il giorno dom 10 lug 2016 alle ore 19:45 David Edmundson <
> david at davidedmundson.co.uk> ha scritto:
>
>>
>> ​You're missing this line somewhere:
>>
>> K_EXPORT_PLASMA_RUNNER(my-test-runner, MyTestRunner)
>>
>> It exports the big that make it a plugin, with the entry point that
>> krunner needs.
>>
>> Also you can then kill your mytestrunner_global.h code, as that's
>> exporting code for linking against, which is a bit different.
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160710/ae3bf2c0/attachment.html>


More information about the Plasma-devel mailing list