Various fixes

This commit is contained in:
timoreo
2022-01-18 12:28:55 +01:00
parent 975f77756d
commit affc2521aa
7 changed files with 24 additions and 16 deletions

View File

@ -362,7 +362,8 @@ void ModFolderPage::on_actionInstall_mods_triggered()
if(mdownload.exec()) {
ModDownloadTask *task = mdownload.getTask();
if (task) {
connect(task, &Task::failed, [this](QString reason) {
connect(task, &Task::failed, [this, task](QString reason) {
task->deleteLater();
CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
});
connect(task, &Task::succeeded, [this, task]() {
@ -371,6 +372,7 @@ void ModFolderPage::on_actionInstall_mods_triggered()
CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'),
QMessageBox::Warning)->show();
}
task->deleteLater();
});
ProgressDialog loadDialog(this);
loadDialog.setSkipButton(true, tr("Abort"));