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

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


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

The following commit has been merged in the master branch:
commit 519d67023ca55900a212d3cf547e1fb3ebc275fc
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Sun May 17 18:47:31 2015 -0700

    Added tooltip to model
---
 interfaces/CMakeLists.txt   |  1 +
 interfaces/devicesmodel.cpp | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt
index 89cbf64..eb72363 100644
--- a/interfaces/CMakeLists.txt
+++ b/interfaces/CMakeLists.txt
@@ -71,6 +71,7 @@ LINK_PUBLIC
     Qt5::DBus
 LINK_PRIVATE
     KF5::ConfigCore
+    KF5::I18n
 )
 
 configure_file(KDEConnectConfig.cmake.in ${CMAKE_BINARY_DIR}/interfaces/KDEConnectConfig.cmake @ONLY)
diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp
index c670b46..e3ba876 100644
--- a/interfaces/devicesmodel.cpp
+++ b/interfaces/devicesmodel.cpp
@@ -21,6 +21,8 @@
 #include "devicesmodel.h"
 #include "interfaces_debug.h"
 
+#include <KLocalizedString>
+
 #include <QDebug>
 #include <QDBusInterface>
 #include <QIcon>
@@ -210,8 +212,12 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
             return device->id();
         case NameModelRole:
             return device->name();
-        case Qt::ToolTipRole:
-            return QVariant(); //To implement
+        case Qt::ToolTipRole: {
+            bool paired = device->isPaired();
+            bool reachable = device->isReachable();
+            QString status = reachable? (paired? i18n("Device trusted and connected") : i18n("Device not trusted")) : i18n("Device disconnected");
+            return status;
+        }
         case StatusModelRole: {
             int status = StatusUnknown;
             if (device->isReachable()) {

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list