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

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


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

The following commit has been merged in the master branch:
commit 46b57003cde7aff2c769dbacaa4688707edc9d3d
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Jun 19 07:14:02 2015 +0200

    Display the device model section
    
    This way we can differentiate between the different states
---
 app/qml/main.qml            | 21 ++++++++++++++++++++-
 interfaces/devicesmodel.cpp |  1 +
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/app/qml/main.qml b/app/qml/main.qml
index 00fb900..c6e0e47 100644
--- a/app/qml/main.qml
+++ b/app/qml/main.qml
@@ -40,6 +40,25 @@ ApplicationWindow
             Layout.fillHeight: true
             ListView {
                 id: devicesView
+
+                section {
+                    property: "status"
+                    delegate: Label {
+                        text: switch (parseInt(section))
+                        {
+                            case DevicesModel.StatusUnknown:
+                                return i18n("Unknown")
+                            case DevicesModel.StatusPaired:
+                                return i18n("Paired")
+                            case DevicesModel.StatusReachable:
+                                return i18n("Reachable")
+                            case (DevicesModel.StatusReachable | DevicesModel.StatusPaired):
+                                return i18n("Paired & Reachable")
+                        }
+
+                    }
+                }
+
                 spacing: 5
                 model: DevicesSortProxyModel {
                     sourceModel: DevicesModel {
@@ -49,7 +68,7 @@ ApplicationWindow
                 }
                 delegate: DeviceDelegate {
                     width: parent.width
-                   onClicked: {
+                    onClicked: {
                         var data = {
                             item: deviceViewComponent,
                             properties: {currentDevice: device}
diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp
index 4935755..aca3d46 100644
--- a/interfaces/devicesmodel.cpp
+++ b/interfaces/devicesmodel.cpp
@@ -63,6 +63,7 @@ QHash< int, QByteArray > DevicesModel::roleNames() const
     names.insert(IdModelRole, "deviceId");
     names.insert(IconNameRole, "iconName");
     names.insert(DeviceRole, "device");
+    names.insert(StatusModelRole, "status");
     return names;
 }
 

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list