MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / runModalTask

Method runModalTask

launcher/ui/MainWindow.cpp:831–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831void MainWindow::runModalTask(Task* task)
832{
833 connect(task, &Task::failed,
834 [this](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
835 connect(task, &Task::succeeded, [this, task]() {
836 QStringList warnings = task->warnings();
837 if (warnings.count()) {
838 CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
839 }
840 });
841 connect(task, &Task::aborted, [this] {
842 CustomMessageBox::selectable(this, tr("Task aborted"), tr("The task has been aborted by the user."), QMessageBox::Information)
843 ->show();
844 });
845 ProgressDialog loadDialog(this);
846 loadDialog.setSkipButton(true, tr("Abort"));
847 loadDialog.execWithTask(task);
848}
849
850void MainWindow::instanceFromInstanceTask(InstanceTask* rawTask)
851{

Callers

nothing calls this directly

Calls 6

selectableFunction · 0.85
showMethod · 0.80
setSkipButtonMethod · 0.80
execWithTaskMethod · 0.80
warningsMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected