fix: simplify abort handling and add missing emits
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
4b0ceea894
commit
6541570969
16 changed files with 85 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue