| 41 | } |
| 42 | |
| 43 | void ClientsModel::removeClient(QWaylandClient *client) |
| 44 | { |
| 45 | int index = -1; |
| 46 | for (int i = 0; i < m_clients.size(); ++i) { |
| 47 | if (m_clients.at(i) == client) { |
| 48 | index = i; |
| 49 | break; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | if (index == -1) { |
| 54 | return; |
| 55 | } |
| 56 | |
| 57 | beginRemoveRows(QModelIndex(), index, index); |
| 58 | m_clients.removeAt(index); |
| 59 | endRemoveRows(); |
| 60 | } |
| 61 | |
| 62 | int ClientsModel::rowCount(const QModelIndex &parent) const |
| 63 | { |