fix: simplify abort handling and add missing emits

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-28 15:58:04 -03:00
parent 4b0ceea894
commit 6541570969
16 changed files with 85 additions and 16 deletions

View File

@ -1656,6 +1656,10 @@ void MainWindow::runModalTask(Task *task)
CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
}
});
connect(task, &Task::aborted, [this]
{
CustomMessageBox::selectable(this, tr("Task aborted"), tr("The task has been aborted by the user."), QMessageBox::Information)->show();
});
ProgressDialog loadDialog(this);
loadDialog.setSkipButton(true, tr("Abort"));
loadDialog.execWithTask(task);