| 84 | } |
| 85 | |
| 86 | Qt::ItemFlags ClientToolModel::flags(const QModelIndex &index) const |
| 87 | { |
| 88 | Qt::ItemFlags flags = QAbstractListModel::flags(index); |
| 89 | if (!index.isValid()) |
| 90 | return flags; |
| 91 | |
| 92 | const auto tool = m_toolManager->tools().at(index.row()); |
| 93 | if (!tool.isEnabled() || (!tool.remotingSupported() && Endpoint::instance()->isRemoteClient())) |
| 94 | flags &= ~(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
| 95 | return flags; |
| 96 | } |
| 97 | |
| 98 | int ClientToolModel::rowCount(const QModelIndex &parent) const |
| 99 | { |
nothing calls this directly
no test coverage detected