[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:29:04 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=47147c5

The following commit has been merged in the master branch:
commit 47147c5fa10edf87e5b19eb2dfefda757a059538
Merge: ea253b175536cbc294e03e3f11a5b2a1fec1f811 c2acc37da6d1c631a9b125f3211cca123cee9bb4
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Sep 11 14:04:54 2015 +0200

    Merge branch 'stable'

 core/device.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --cc core/device.cpp
index a820696,c182cc4..b30ae3f
--- a/core/device.cpp
+++ b/core/device.cpp
@@@ -120,32 -121,35 +121,33 @@@ void Device::reloadPlugins(
  
          //Code borrowed from KWin
          foreach (const QString& pluginName, loader->getPluginList()) {
 -            QString enabledKey = pluginName + QString::fromLatin1("Enabled");
 +            const KPluginMetaData service = loader->getPluginInfo(pluginName);
 +            const QSet<QString> incomingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-SupportedPackageType").toSet();
 +            const QSet<QString> outgoingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType").toSet();
  
 -            bool isPluginEnabled = (pluginStates.hasKey(enabledKey) ? pluginStates.readEntry(enabledKey, false)
 -                                                            : loader->getPluginInfo(pluginName).isEnabledByDefault());
 +            const bool pluginEnabled = isPluginEnabled(pluginName);
  
 -            if (isPluginEnabled) {
 -                KdeConnectPlugin* plugin = m_plugins.take(pluginName);
 -                QStringList incomingInterfaces, outgoingInterfaces;
 -                if (plugin) {
 -                    incomingInterfaces = m_pluginsByIncomingInterface.keys(plugin);
 -                    outgoingInterfaces = m_pluginsByOutgoingInterface.keys(plugin);
 -                } else {
 -                    const KPluginMetaData service = loader->getPluginInfo(pluginName);
 -                    incomingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-SupportedPackageType");
 -                    outgoingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType");
 -                }
 +            if (pluginEnabled) {
 +                supportedIncomingInterfaces += incomingInterfaces;
 +            }
  
 -                //If we don't find intersection with the received on one end and the sent on the other, we don't
 -                //let the plugin stay
 -                //Also, if no capabilities are specified on the other end, we don't apply this optimizaton, as
 -                //we assume that the other client doesn't know about capabilities.
 -                const bool capabilitiesSupported = deviceSupportsCapabilities && (!incomingInterfaces.isEmpty() || !outgoingInterfaces.isEmpty());
 -                if (capabilitiesSupported
 -                    && (m_incomingCapabilities & outgoingInterfaces.toSet()).isEmpty()
 -                    && (m_outgoingCapabilities & incomingInterfaces.toSet()).isEmpty()
 -                ) {
 -                    delete plugin;
 -                    continue;
 -                }
 +            //If we don't find intersection with the received on one end and the sent on the other, we don't
 +            //let the plugin stay
 +            //Also, if no capabilities are specified on the other end, we don't apply this optimizaton, as
 +            //we assume that the other client doesn't know about capabilities.
-             if ((!m_incomingCapabilities.isEmpty() || !m_outgoingCapabilities.isEmpty())
++
++            const bool capabilitiesSupported = deviceSupportsCapabilities && (!incomingInterfaces.isEmpty() || !outgoingInterfaces.isEmpty());
++            if (capabilitiesSupported
 +                && (m_incomingCapabilities & outgoingInterfaces).isEmpty()
 +                && (m_outgoingCapabilities & incomingInterfaces).isEmpty()
-                 && !incomingInterfaces.isEmpty() && !outgoingInterfaces.isEmpty()
 +            ) {
 +                qCWarning(KDECONNECT_CORE) << "not loading " << pluginName << "because of unmatched capabilities";
 +                unsupportedPlugins.append(pluginName);
 +                continue;
 +            }
 +
 +            if (pluginEnabled) {
 +                KdeConnectPlugin* plugin = m_plugins.take(pluginName);
  
                  if (!plugin) {
                      plugin = loader->instantiatePluginForDevice(pluginName, this);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list