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

Method runModalTask

launcher/ui/MainWindow.cpp:1372–1389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370}
1371
1372void MainWindow::runModalTask(Task *task)
1373{
1374 connect(task, &Task::failed, [this](QString reason)
1375 {
1376 CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
1377 });
1378 connect(task, &Task::succeeded, [this, task]()
1379 {
1380 QStringList warnings = task->warnings();
1381 if(warnings.count())
1382 {
1383 CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
1384 }
1385 });
1386 ProgressDialog loadDialog(this);
1387 loadDialog.setSkipButton(true, tr("Abort"));
1388 loadDialog.execWithTask(task);
1389}
1390
1391void MainWindow::instanceFromInstanceTask(InstanceTask *rawTask)
1392{

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