mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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
|
|
@ -91,6 +91,7 @@ void InstanceImportTask::executeTask()
|
|||
connect(m_filesNetJob.get(), &NetJob::succeeded, this, &InstanceImportTask::downloadSucceeded);
|
||||
connect(m_filesNetJob.get(), &NetJob::progress, this, &InstanceImportTask::downloadProgressChanged);
|
||||
connect(m_filesNetJob.get(), &NetJob::failed, this, &InstanceImportTask::downloadFailed);
|
||||
connect(m_filesNetJob.get(), &NetJob::aborted, this, &InstanceImportTask::downloadAborted);
|
||||
|
||||
m_filesNetJob->start();
|
||||
}
|
||||
|
|
@ -113,6 +114,12 @@ void InstanceImportTask::downloadProgressChanged(qint64 current, qint64 total)
|
|||
setProgress(current, total);
|
||||
}
|
||||
|
||||
void InstanceImportTask::downloadAborted()
|
||||
{
|
||||
emitAborted();
|
||||
m_filesNetJob.reset();
|
||||
}
|
||||
|
||||
void InstanceImportTask::processZipPack()
|
||||
{
|
||||
setStatus(tr("Extracting modpack"));
|
||||
|
|
@ -246,9 +253,7 @@ void InstanceImportTask::extractFinished()
|
|||
|
||||
void InstanceImportTask::extractAborted()
|
||||
{
|
||||
emitFailed(tr("Instance import has been aborted."));
|
||||
emit aborted();
|
||||
return;
|
||||
emitAborted();
|
||||
}
|
||||
|
||||
void InstanceImportTask::processFlame()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue