MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / runModalTask

Method runModalTask

launcher/ui/MainWindow.cpp:852–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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