fix: simplify abort handling and add missing emits

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-28 15:58:04 -03:00
parent 4b0ceea894
commit 6541570969
16 changed files with 85 additions and 16 deletions

View File

@ -86,6 +86,7 @@ void PackInstallTask::downloadPack()
connect(netJobContainer.get(), &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
connect(netJobContainer.get(), &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
connect(netJobContainer.get(), &NetJob::progress, this, &PackInstallTask::onDownloadProgress);
connect(netJobContainer.get(), &NetJob::aborted, this, &PackInstallTask::onDownloadAborted);
netJobContainer->start();
progress(1, 4);
@ -110,6 +111,11 @@ void PackInstallTask::onDownloadProgress(qint64 current, qint64 total)
setStatus(tr("Downloading zip for %1 (%2%)").arg(m_pack.name).arg(current / 10));
}
void PackInstallTask::onDownloadAborted()
{
emitAborted();
}
void PackInstallTask::unzip()
{
progress(2, 4);