| 65 | } |
| 66 | |
| 67 | bool ProgressWidget::exec(std::shared_ptr<Task> task) |
| 68 | { |
| 69 | QEventLoop loop; |
| 70 | |
| 71 | connect(task.get(), &Task::finished, &loop, &QEventLoop::quit); |
| 72 | |
| 73 | start(task.get()); |
| 74 | |
| 75 | if (task->isRunning()) |
| 76 | loop.exec(); |
| 77 | |
| 78 | return task->wasSuccessful(); |
| 79 | } |
| 80 | |
| 81 | void ProgressWidget::show() |
| 82 | { |
no test coverage detected