Only allow waking PCs that are not online and paired
This commit is contained in:
parent
e250e08242
commit
017362a5d1
3 changed files with 7 additions and 2 deletions
|
|
@ -46,6 +46,8 @@ QVariant ComputerModel::data(const QModelIndex& index, int role) const
|
|||
return computer->pairState == NvComputer::PS_PAIRED;
|
||||
case BusyRole:
|
||||
return computer->currentGameId != 0;
|
||||
case WakeableRole:
|
||||
return !computer->macAddress.isEmpty();
|
||||
case AddPcRole:
|
||||
return false;
|
||||
default:
|
||||
|
|
@ -74,6 +76,7 @@ QHash<int, QByteArray> ComputerModel::roleNames() const
|
|||
names[PairedRole] = "paired";
|
||||
names[BusyRole] = "busy";
|
||||
names[AddPcRole] = "addPc";
|
||||
names[WakeableRole] = "wakeable";
|
||||
|
||||
return names;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue