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