| 358 | } |
| 359 | |
| 360 | QModelIndex VersionProxyModel::getVersion(const QString& version) const |
| 361 | { |
| 362 | int found = -1; |
| 363 | for (int i = 0; i < rowCount(); i++) { |
| 364 | auto value = sourceModel()->data(mapToSource(index(i, 0)), BaseVersionList::VersionRole); |
| 365 | if (value.toString() == version) { |
| 366 | found = i; |
| 367 | } |
| 368 | } |
| 369 | if (found == -1) { |
| 370 | return QModelIndex(); |
| 371 | } |
| 372 | return index(found, 0); |
| 373 | } |
| 374 | |
| 375 | void VersionProxyModel::clearFilters() |
| 376 | { |
nothing calls this directly
no test coverage detected