Only allow waking PCs that are not online and paired

This commit is contained in:
Cameron Gutman
2018-07-31 22:10:38 -07:00
parent e250e08242
commit 017362a5d1
3 changed files with 7 additions and 2 deletions

View File

@@ -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;
}