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

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


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

The following commit has been merged in the master branch:
commit fda4556dfc7b5ff435ab13407b407a339c980723
Author: Aleix Pol <aleixpol at kde.org>
Date:   Mon Mar 16 02:31:59 2015 +0100

    Take into account the integrated filter in the DevicesModel
---
 interfaces/devicesmodel.cpp | 14 ++++++++------
 interfaces/devicesmodel.h   |  2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp
index 028497e..dd0e5bf 100644
--- a/interfaces/devicesmodel.cpp
+++ b/interfaces/devicesmodel.cpp
@@ -84,9 +84,12 @@ void DevicesModel::deviceAdded(const QString& id)
         const QModelIndex idx = index(row, 0);
         Q_EMIT dataChanged(idx, idx);
     } else {
-        beginInsertRows(QModelIndex(), m_deviceList.count(), m_deviceList.count());
-        appendDevice(id);
-        endInsertRows();
+        DeviceDbusInterface* dev = new DeviceDbusInterface(id, this);
+        if (dev->isReachable() == bool(m_displayFilter & StatusReachable) && dev->isPaired() == bool(m_displayFilter & StatusPaired)) {
+            beginInsertRows(QModelIndex(), m_deviceList.count(), m_deviceList.count());
+            appendDevice(dev);
+            endInsertRows();
+        }
     }
 }
 
@@ -152,14 +155,13 @@ void DevicesModel::receivedDeviceList(QDBusPendingCallWatcher* watcher)
 
     beginInsertRows(QModelIndex(), 0, deviceIds.count()-1);
     Q_FOREACH(const QString& id, deviceIds) {
-        appendDevice(id);
+        appendDevice(new DeviceDbusInterface(id, this));
     }
     endInsertRows();
 }
 
-void DevicesModel::appendDevice(const QString& id)
+void DevicesModel::appendDevice(DeviceDbusInterface* dev)
 {
-    DeviceDbusInterface* dev = new DeviceDbusInterface(id, this);
     m_deviceList.append(dev);
     connect(dev, SIGNAL(nameChanged(QString)), SLOT(nameChanged(QString)));
 }
diff --git a/interfaces/devicesmodel.h b/interfaces/devicesmodel.h
index 0923cf3..1f157b2 100644
--- a/interfaces/devicesmodel.h
+++ b/interfaces/devicesmodel.h
@@ -83,7 +83,7 @@ Q_SIGNALS:
 private:
     void clearDevices();
     int rowForDeviceId(const QString& id) const;
-    void appendDevice(const QString& id);
+    void appendDevice(DeviceDbusInterface* dev);
 
     DaemonDbusInterface* m_dbusInterface;
     QVector<DeviceDbusInterface*> m_deviceList;

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list