| 413 | } |
| 414 | |
| 415 | QModelIndex VersionProxyModel::getVersion(const QString& version) const |
| 416 | { |
| 417 | int found = -1; |
| 418 | for (int i = 0; i < rowCount(); i++) |
| 419 | { |
| 420 | auto value = sourceModel()->data(mapToSource(index(i, 0)), BaseVersionList::VersionRole); |
| 421 | if (value.toString() == version) |
| 422 | { |
| 423 | found = i; |
| 424 | } |
| 425 | } |
| 426 | if(found == -1) |
| 427 | { |
| 428 | return QModelIndex(); |
| 429 | } |
| 430 | return index(found, 0); |
| 431 | } |
| 432 | |
| 433 | void VersionProxyModel::clearFilters() |
| 434 | { |
nothing calls this directly
no test coverage detected