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
This commit is contained in:
David Kahles 2016-04-01 15:18:14 +02:00
parent e86ea7b3bd
commit 6cc1946443

View file

@ -262,10 +262,10 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
} }
case StatusModelRole: { case StatusModelRole: {
int status = StatusFilterFlag::NoFilter; int status = StatusFilterFlag::NoFilter;
if (device->isReachable()) { if (device->isReachable())
status |= StatusFilterFlag::Reachable; status |= StatusFilterFlag::Reachable;
if (device->isPaired()) status |= StatusFilterFlag::Paired; if (device->isPaired())
} status |= StatusFilterFlag::Paired;
return status; return status;
} }
case IconNameRole: case IconNameRole: