From 6cc194644340ad7037ca86f07e30b337ccc78326 Mon Sep 17 00:00:00 2001 From: David Kahles Date: Fri, 1 Apr 2016 15:18:14 +0200 Subject: [PATCH] Allow paired and not reachable devices in the model The server supports this device state (e.g. if a device was saved as paired, but isn't reachable), so let's expose it to the model. The display filter should take care of excluding such devices if nessecarry. To make sure that such devices aren't shown in the kcm (we can't do anything useful with them at the moment), set the display filter accordingly. REVIEW: 127553 --- interfaces/devicesmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp index 7b0fdbb77..af192c814 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -262,10 +262,10 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const } case StatusModelRole: { int status = StatusFilterFlag::NoFilter; - if (device->isReachable()) { + if (device->isReachable()) status |= StatusFilterFlag::Reachable; - if (device->isPaired()) status |= StatusFilterFlag::Paired; - } + if (device->isPaired()) + status |= StatusFilterFlag::Paired; return status; } case IconNameRole: