Fix crash on the placeholder icon and fix display of multiple PCs

This commit is contained in:
Cameron Gutman
2018-07-04 16:52:16 -07:00
parent 3a7d3c807e
commit 485c014490
2 changed files with 13 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ QVariant ComputerModel::data(const QModelIndex& index, int role) const
return "Add PC";
case AddPcRole:
return true;
default:
return QVariant();
}
}
else if (index.row() > m_Computers.count()) {
@@ -69,6 +71,7 @@ QHash<int, QByteArray> ComputerModel::roleNames() const
names[OnlineRole] = "online";
names[PairedRole] = "paired";
names[BusyRole] = "busy";
names[AddPcRole] = "addPc";
return names;
}