KPluginLoader::findPlugins(..) returning empty vector

Srivatsan Iyer supersaiyanmode.rox at gmail.com
Fri Aug 12 09:35:43 UTC 2016


Hi Aleix,

Thanks for your response. It was not installing to /usr. I re ran cmake
with the proper prefix and got it installed to /usr. That hasn't yet solved
the problem. From the docs, I understand that the
KPluginLoader::findPlugins(..) can take an absolute path -- i tried that
too without any success. I even tried exporting QT_DEBUG_PLUGINS=1. That
gave me a set of paths where QFactoryLoader::QFactoryLoader() was looking
for. If it is of any use, I have pasted `sed | sort | uniq` version here:
http://pastebin.com/k7acTvLP. Would you have any ideas about what is going
on?

Oh and BTW, prior to compiling from sources, I had KDE-connect installed as
a part of kubuntu-desktop package. It worked perfectly until I uninstalled
it to replace it with what I compiled.

Srivatsan

On Thu, 11 Aug 2016 at 17:37 Aleix Pol <aleixpol at kde.org> wrote:

> 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
>
-- 

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


More information about the KDEConnect mailing list