| 377 | } |
| 378 | |
| 379 | void Model::selectAllUpdates() |
| 380 | { |
| 381 | if (!root_) |
| 382 | return; |
| 383 | |
| 384 | const auto visitor = [this](Component &component, auto v) -> void { |
| 385 | if (component.checkOnly) |
| 386 | return; |
| 387 | |
| 388 | if (component.state == State::UpdateAvailable) |
| 389 | updater_.applyAction(Action::Install, component.files); |
| 390 | |
| 391 | if (!component.children.empty()) { |
| 392 | for (auto &child : component.children) v(*child, v); |
| 393 | } |
| 394 | }; |
| 395 | |
| 396 | visitor(*root_, visitor); |
| 397 | } |
| 398 | |
| 399 | void Model::tryAction(Action action, const QModelIndex &index) |
| 400 | { |
no test coverage detected