diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 89cbf64bb..eb72363ff 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 c670b4611..e3ba87624 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -21,6 +21,8 @@ #include "devicesmodel.h" #include "interfaces_debug.h" +#include + #include #include #include @@ -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()) {