fix: simplify abort handling and add missing emits
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
4b0ceea894
commit
6541570969
16 changed files with 85 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue