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

Method runModalTask

launcher/ui/MainWindow.cpp:1354–1371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354void MainWindow::runModalTask(Task *task)
1355{
1356 connect(task, &Task::failed, [this](QString reason)
1357 {
1358 CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
1359 });
1360 connect(task, &Task::succeeded, [this, task]()
1361 {
1362 QStringList warnings = task->warnings();
1363 if(warnings.count())
1364 {
1365 CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
1366 }
1367 });
1368 ProgressDialog loadDialog(this);
1369 loadDialog.setSkipButton(true, tr("Abort"));
1370 loadDialog.execWithTask(task);
1371}
1372
1373void MainWindow::instanceFromInstanceTask(InstanceTask *rawTask)
1374{

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected