[SCM] kdeconnect packaging branch, master, updated. upstream/1.0.1-206-gf661872

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 18:27:01 UTC 2017


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

The following commit has been merged in the master branch:
commit b69247b4e5ef0ebab58edc639c9d0d094b1a0cde
Author: Aleix Pol <aleixpol at kde.org>
Date:   Sun Aug 21 18:57:27 2016 +0200

    Don't force the creation of a DeviceInterface for every pluginchecker
    
    Create one per device and share it
---
 app/qml/PluginItem.qml                           |  2 +-
 plasmoid/declarativeplugin/qml/PluginChecker.qml |  4 +---
 plasmoid/package/contents/ui/Battery.qml         |  5 ++---
 plasmoid/package/contents/ui/DeviceDelegate.qml  | 12 +++++-------
 plasmoid/package/contents/ui/FindMyPhone.qml     |  5 ++---
 plasmoid/package/contents/ui/Sftp.qml            |  5 ++---
 6 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/app/qml/PluginItem.qml b/app/qml/PluginItem.qml
index ec6afde..cf96aad 100644
--- a/app/qml/PluginItem.qml
+++ b/app/qml/PluginItem.qml
@@ -32,7 +32,7 @@ Kirigami.BasicListItem
 
     readonly property var checker: PluginChecker {
         id: checker
-        deviceId: deviceView.currentDevice.id()
+        device: deviceView.currentDevice
     }
     visible: checker.available
     onClicked: {
diff --git a/plasmoid/declarativeplugin/qml/PluginChecker.qml b/plasmoid/declarativeplugin/qml/PluginChecker.qml
index 194b4fb..dfd1114 100644
--- a/plasmoid/declarativeplugin/qml/PluginChecker.qml
+++ b/plasmoid/declarativeplugin/qml/PluginChecker.qml
@@ -26,14 +26,12 @@ QtObject {
 
     id: root
 
-    property string deviceId: ""
+    property alias device: conn.target
     property string pluginName: ""
     property bool available: false
-    readonly property alias device: conn.target
 
     readonly property Connections connection: Connections {
         id: conn
-        target: DeviceDbusInterfaceFactory.create(root.deviceId)
         onPluginsChanged: pluginsChanged()
     }
 
diff --git a/plasmoid/package/contents/ui/Battery.qml b/plasmoid/package/contents/ui/Battery.qml
index 02bf7cf..2dd9aca 100644
--- a/plasmoid/package/contents/ui/Battery.qml
+++ b/plasmoid/package/contents/ui/Battery.qml
@@ -27,8 +27,7 @@ QtObject {
   
     id: root
     
-    property alias deviceId: checker.deviceId
-    readonly property alias device: checker.device
+    property alias device: checker.device
     readonly property alias available: checker.available
 
     readonly property PluginChecker pluginChecker: PluginChecker {
@@ -55,7 +54,7 @@ QtObject {
     
     onAvailableChanged: {
         if (available) {
-            battery = DeviceBatteryDbusInterfaceFactory.create(deviceId)
+            battery = DeviceBatteryDbusInterfaceFactory.create(device.id())
             
             battery.stateChanged.connect(function(c) {charging = c})
             battery.chargeChanged.connect(function(c) {charge = c})
diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml
index a4f70eb..e9419e7 100644
--- a/plasmoid/package/contents/ui/DeviceDelegate.qml
+++ b/plasmoid/package/contents/ui/DeviceDelegate.qml
@@ -27,10 +27,8 @@ import org.kde.kdeconnect 1.0
 PlasmaComponents.ListItem
 {
     id: root
-    property string deviceId: model.deviceId
-   
+    readonly property QtObject device: DeviceDbusInterfaceFactory.create(model.deviceId)
 
-   
     Column {
         width: parent.width
         
@@ -53,7 +51,7 @@ PlasmaComponents.ListItem
             {
                 FindMyPhone {
                     id: findmyphone
-                    deviceId: root.deviceId
+                    device: root.device
                 }
 
                 id: ring
@@ -71,7 +69,7 @@ PlasmaComponents.ListItem
             {
                 Sftp {
                     id: sftp
-                    deviceId: root.deviceId
+                    device: root.device
                 }
 
                 id: browse
@@ -93,7 +91,7 @@ PlasmaComponents.ListItem
 
             Battery {
                 id: battery
-                deviceId: root.deviceId
+                device: root.device
             }
 
             sectionDelegate: true
@@ -129,7 +127,7 @@ PlasmaComponents.ListItem
             id: notificationsView
             model: NotificationsModel {
                 id: notificationsModel
-                deviceId: root.deviceId
+                deviceId: root.device.id()
             }
             delegate: PlasmaComponents.ListItem {
                 PlasmaComponents.Label {
diff --git a/plasmoid/package/contents/ui/FindMyPhone.qml b/plasmoid/package/contents/ui/FindMyPhone.qml
index 3a23fde..846c153 100644
--- a/plasmoid/package/contents/ui/FindMyPhone.qml
+++ b/plasmoid/package/contents/ui/FindMyPhone.qml
@@ -27,8 +27,7 @@ QtObject {
 
     id: root
 
-    property alias deviceId: checker.deviceId
-    readonly property alias device: checker.device
+    property alias device: checker.device
     readonly property alias available: checker.available
 
     readonly property PluginChecker pluginChecker: PluginChecker {
@@ -46,7 +45,7 @@ QtObject {
 
     onAvailableChanged: {
         if (available) {
-            findMyPhone = FindMyPhoneDbusInterfaceFactory.create(deviceId)
+            findMyPhone = FindMyPhoneDbusInterfaceFactory.create(device.id())
         } else {
             findMyPhone = null
         }
diff --git a/plasmoid/package/contents/ui/Sftp.qml b/plasmoid/package/contents/ui/Sftp.qml
index fd817e5..e3fc65f 100644
--- a/plasmoid/package/contents/ui/Sftp.qml
+++ b/plasmoid/package/contents/ui/Sftp.qml
@@ -27,8 +27,7 @@ QtObject {
 
     id: root
 
-    property alias deviceId: checker.deviceId
-    readonly property alias device: checker.device
+    property alias device: checker.device
     readonly property alias available: checker.available
 
     readonly property PluginChecker pluginChecker: PluginChecker {
@@ -45,7 +44,7 @@ QtObject {
 
     onAvailableChanged: {
         if (available) {
-            sftp = SftpDbusInterfaceFactory.create(deviceId)
+            sftp = SftpDbusInterfaceFactory.create(device.id())
         } else {
             sftp = null
         }

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list