| 233 | } |
| 234 | |
| 235 | void BinaryToolsModel::removeTool(const QModelIndex &index) |
| 236 | { |
| 237 | auto tool = toolForIndex(index); |
| 238 | int groupIndex = 0; |
| 239 | for (auto &items : binaryTools) { |
| 240 | int pos = items.indexOf(*tool); |
| 241 | if (pos != -1) { |
| 242 | beginRemoveRows(this->index(groupIndex, 0), pos, pos); |
| 243 | items.removeAt(pos); |
| 244 | endRemoveRows(); |
| 245 | break; |
| 246 | } |
| 247 | ++groupIndex; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | void BinaryToolsModel::removeGroup(const QModelIndex &index) |
| 252 | { |
no test coverage detected