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() {
|
bool ModrinthPackExportTask::abort() {
|
||||||
if (!task.isNull())
|
if (!task.isNull() && task->abort()) {
|
||||||
return task->abort();
|
task = nullptr;
|
||||||
|
emitFailed(tr("Aborted"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,8 @@ void ExportMrPackDialog::done(int result)
|
|||||||
|
|
||||||
ProgressDialog progress(this);
|
ProgressDialog progress(this);
|
||||||
progress.setSkipButton(true, tr("Abort"));
|
progress.setSkipButton(true, tr("Abort"));
|
||||||
progress.execWithTask(&task);
|
if (progress.execWithTask(&task) != QDialog::Accepted)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDialog::done(result);
|
QDialog::done(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user