Added QFutureWatcher
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com> abort forgot Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -146,11 +146,8 @@ void ExportInstanceDialog::doExport()
|
||||
|
||||
auto task = makeShared<MMCZip::ExportToZipTask>(output, m_instance->instanceRoot(), files, "", true);
|
||||
|
||||
connect(task.get(), &Task::failed, this, [this, output](QString reason) {
|
||||
CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
|
||||
QFile::remove(output);
|
||||
});
|
||||
connect(task.get(), &Task::aborted, this, [output] { QFile::remove(output); });
|
||||
connect(task.get(), &Task::failed, this,
|
||||
[this, output](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
|
||||
connect(task.get(), &Task::finished, this, [task] { task->deleteLater(); });
|
||||
|
||||
ProgressDialog progress(this);
|
||||
|
Reference in New Issue
Block a user