Fix abort?
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
f583e617ec
commit
87384182a1
@ -54,8 +54,12 @@ void ModrinthPackExportTask::executeTask()
|
||||
}
|
||||
|
||||
bool ModrinthPackExportTask::abort() {
|
||||
if (!task.isNull())
|
||||
return task->abort();
|
||||
if (!task.isNull() && task->abort()) {
|
||||
task = nullptr;
|
||||
emitFailed(tr("Aborted"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,8 @@ void ExportMrPackDialog::done(int result)
|
||||
|
||||
ProgressDialog progress(this);
|
||||
progress.setSkipButton(true, tr("Abort"));
|
||||
progress.execWithTask(&task);
|
||||
if (progress.execWithTask(&task) != QDialog::Accepted)
|
||||
return;
|
||||
}
|
||||
|
||||
QDialog::done(result);
|
||||
|
Loading…
Reference in New Issue
Block a user