KPluginLoader::findPlugins(..) returning empty vector

Srivatsan Iyer supersaiyanmode.rox at gmail.com
Thu Aug 11 09:37:55 UTC 2016


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"


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 ?

Thanks,
Srivatsan
-- 

Srivatsan Iyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20160811/88887a35/attachment.html>


More information about the KDEConnect mailing list