KPluginLoader::findPlugins(..) returning empty vector

Aleix Pol aleixpol at kde.org
Fri Aug 12 00:36:18 UTC 2016


On Thu, Aug 11, 2016 at 11:37 AM, Srivatsan Iyer
<supersaiyanmode.rox at gmail.com> wrote:
> Hello,
>
> I checked out the kdeconnect-kde repository and have been trying to compile
> from sources. I have been able to get it running. However, when I connect
> via the phone, I see an empty list in the main activity. I spent a few hours
> digging -- from the PluginFactory Java class (in Android) to
> pluginloader.cpp. I am stuck at the point where
> KPluginLoader::findPlugins("kdeconnect/") in PluginLoader constructor
> returns an empty vector causing all downstream capabilities listing to
> silently fail. From the documentation I, sort of, understand that it is a
> directory -- but where is it? The docs say it looks for JSON files within
> the subdirectories under it. Should this be plugins directory instead? I
> tried passing in, without any success, the absolute path to my local
> kdeconnect-kde/plugins directory. I would really appreciate any pointers or
> help.
>
> Details about my environment:
>  - KDE Plasma version: 5.6.5
>  - KDE Frameworks version: 5.23.0
>  - QT Version: 5.5.1
>  - Kernel version: 4.4.0-31-generic
>
> My method to run and debug:
>  - make && sudo make install
>  - (kill kdeconnectd)
>  - call "kdeconnect-cli -l" (seems to have a side effect of starting the
> daemon if not running)
>  - check logs using "tail -f /var/log/syslog | grep kdeconn"

Can you make sure that you're installing to /usr or that
QT_PLUGIN_PATH is properly initialized?

> On a slightly different note: I had compile issues with pluginloader.cpp
> within the function "pluginsForCapabilities(..)" for that's using
> qSet1.intersects(qSet2). This is unavailable in Qt5.5. I replaced it with an
> inefficient equivalent:
>     if ((pluginIncomingCapabilities.isEmpty()
>         && pluginOutgoingCapabilities.isEmpty())
>         || (incoming & pluginOutgoingCapabilities).size()
>         || (outgoing & pluginIncomingCapabilities).size()) { .. }
>
> Would it make sense to not use .intersects(..) -- because that is the only
> line of code in the entire source that causes the compile to fail on QT
> version 5.5 - 5.6 ?

It compiles fine with Qt 5.6, not Qt 5.5 indeed. I'd recommend you to
use a distribution with the stable version of the packages.
We discussed patching it up, but it doesn't really improve things,
since already released distributions won't pick up the package anyway.

Aleix


More information about the KDEConnect mailing list