| 369 | } |
| 370 | |
| 371 | QModelIndex VersionProxyModel::getVersion(const QString& version) const |
| 372 | { |
| 373 | int found = -1; |
| 374 | for (int i = 0; i < rowCount(); i++) { |
| 375 | auto value = sourceModel()->data(mapToSource(index(i, 0)), BaseVersionList::VersionRole); |
| 376 | if (value.toString() == version) { |
| 377 | found = i; |
| 378 | } |
| 379 | } |
| 380 | if (found == -1) { |
| 381 | return QModelIndex(); |
| 382 | } |
| 383 | return index(found, 0); |
| 384 | } |
| 385 | |
| 386 | void VersionProxyModel::clearFilters() |
| 387 | { |
nothing calls this directly
no test coverage detected