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:
parent
e86ea7b3bd
commit
6cc1946443
1 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue