MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / runModalTask

Method runModalTask

launcher/ui/MainWindow.cpp:851–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849}
850
851void MainWindow::runModalTask(Task* task)
852{
853 connect(task, &Task::failed,
854 [this](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
855 connect(task, &Task::succeeded, [this, task]() {
856 QStringList warnings = task->warnings();
857 if (warnings.count()) {
858 CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
859 }
860 });
861 connect(task, &Task::aborted, [this] {
862 CustomMessageBox::selectable(this, tr("Task aborted"), tr("The task has been aborted by the user."), QMessageBox::Information)
863 ->show();
864 });
865 ProgressDialog loadDialog(this);
866 loadDialog.setSkipButton(true, tr("Abort"));
867 loadDialog.execWithTask(task);
868}
869
870void MainWindow::instanceFromInstanceTask(InstanceTask* rawTask)
871{

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