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

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:58 UTC 2016


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

The following commit has been merged in the master branch:
commit 617b66aeb87a908ce2fe0fdac5c306cf7ced6c07
Author: Aleix Pol <aleixpol at kde.org>
Date:   Tue Sep 8 17:34:48 2015 +0200

    small code simplification
    
    removes changes from list to set
    always uses the same path for figuring out the interfaces.
    
    reviewed by Albert Vaca
---
 core/device.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/core/device.cpp b/core/device.cpp
index 64ab0fb..0957b99 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -122,24 +122,20 @@ void Device::reloadPlugins()
         foreach (const QString& pluginName, loader->getPluginList()) {
             if (isPluginEnabled(pluginName)) {
                 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");
-                }
-                supportedIncomingInterfaces += incomingInterfaces.toSet();
+
+                const KPluginMetaData service = loader->getPluginInfo(pluginName);
+                QSet<QString> incomingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-SupportedPackageType").toSet();
+                QSet<QString> outgoingInterfaces = KPluginMetaData::readStringList(service.rawData(), "X-KdeConnect-OutgoingPackageType").toSet();
+
+                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.
                 if (!m_incomingCapabilities.isEmpty() && !m_outgoingCapabilities.isEmpty()
-                    && (m_incomingCapabilities & outgoingInterfaces.toSet()).isEmpty()
-                    && (m_outgoingCapabilities & incomingInterfaces.toSet()).isEmpty()
+                    && (m_incomingCapabilities & outgoingInterfaces).isEmpty()
+                    && (m_outgoingCapabilities & incomingInterfaces).isEmpty()
                 ) {
                     qCWarning(KDECONNECT_CORE) << "not loading " << pluginName << "because of unmatched capabilities";
                     delete plugin;

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list