aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/technic
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-09-26 08:25:12 -0300
committerGitHub <noreply@github.com>2022-09-26 08:25:12 -0300
commit370c3aa5985698351e706e61c660a3a566a5f09b (patch)
tree5bd62ceec118396d676cf3799edafdb806e4375d /launcher/modplatform/technic
parent58a5331f7bafb149c18f560a0363daab65521262 (diff)
parentdd6f670dec7dfd1a9ad6f4595ad5447ac735c737 (diff)
downloadPrismLauncher-370c3aa5985698351e706e61c660a3a566a5f09b.tar.gz
PrismLauncher-370c3aa5985698351e706e61c660a3a566a5f09b.tar.bz2
PrismLauncher-370c3aa5985698351e706e61c660a3a566a5f09b.zip
Merge pull request #894 from flowln/update_from_external_source
epic PR
Diffstat (limited to 'launcher/modplatform/technic')
-rw-r--r--launcher/modplatform/technic/SingleZipPackInstallTask.cpp2
-rw-r--r--launcher/modplatform/technic/SolderPackInstallTask.cpp10
-rw-r--r--launcher/modplatform/technic/SolderPackInstallTask.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/launcher/modplatform/technic/SingleZipPackInstallTask.cpp b/launcher/modplatform/technic/SingleZipPackInstallTask.cpp
index 9093b245..6438d9ef 100644
--- a/launcher/modplatform/technic/SingleZipPackInstallTask.cpp
+++ b/launcher/modplatform/technic/SingleZipPackInstallTask.cpp
@@ -133,7 +133,7 @@ void Technic::SingleZipPackInstallTask::extractFinished()
shared_qobject_ptr<Technic::TechnicPackProcessor> packProcessor = new Technic::TechnicPackProcessor();
connect(packProcessor.get(), &Technic::TechnicPackProcessor::succeeded, this, &Technic::SingleZipPackInstallTask::emitSucceeded);
connect(packProcessor.get(), &Technic::TechnicPackProcessor::failed, this, &Technic::SingleZipPackInstallTask::emitFailed);
- packProcessor->run(m_globalSettings, m_instName, m_instIcon, m_stagingPath, m_minecraftVersion);
+ packProcessor->run(m_globalSettings, name(), m_instIcon, m_stagingPath, m_minecraftVersion);
}
void Technic::SingleZipPackInstallTask::extractAborted()
diff --git a/launcher/modplatform/technic/SolderPackInstallTask.cpp b/launcher/modplatform/technic/SolderPackInstallTask.cpp
index 89dbf4ca..19731b38 100644
--- a/launcher/modplatform/technic/SolderPackInstallTask.cpp
+++ b/launcher/modplatform/technic/SolderPackInstallTask.cpp
@@ -77,6 +77,7 @@ void Technic::SolderPackInstallTask::executeTask()
auto job = m_filesNetJob.get();
connect(job, &NetJob::succeeded, this, &Technic::SolderPackInstallTask::fileListSucceeded);
connect(job, &NetJob::failed, this, &Technic::SolderPackInstallTask::downloadFailed);
+ connect(job, &NetJob::aborted, this, &Technic::SolderPackInstallTask::downloadAborted);
m_filesNetJob->start();
}
@@ -127,6 +128,7 @@ void Technic::SolderPackInstallTask::fileListSucceeded()
connect(m_filesNetJob.get(), &NetJob::succeeded, this, &Technic::SolderPackInstallTask::downloadSucceeded);
connect(m_filesNetJob.get(), &NetJob::progress, this, &Technic::SolderPackInstallTask::downloadProgressChanged);
connect(m_filesNetJob.get(), &NetJob::failed, this, &Technic::SolderPackInstallTask::downloadFailed);
+ connect(m_filesNetJob.get(), &NetJob::aborted, this, &Technic::SolderPackInstallTask::downloadAborted);
m_filesNetJob->start();
}
@@ -171,6 +173,12 @@ void Technic::SolderPackInstallTask::downloadProgressChanged(qint64 current, qin
setProgress(current / 2, total);
}
+void Technic::SolderPackInstallTask::downloadAborted()
+{
+ emitAborted();
+ m_filesNetJob.reset();
+}
+
void Technic::SolderPackInstallTask::extractFinished()
{
if (!m_extractFuture.result())
@@ -214,7 +222,7 @@ void Technic::SolderPackInstallTask::extractFinished()
shared_qobject_ptr<Technic::TechnicPackProcessor> packProcessor = new Technic::TechnicPackProcessor();
connect(packProcessor.get(), &Technic::TechnicPackProcessor::succeeded, this, &Technic::SolderPackInstallTask::emitSucceeded);
connect(packProcessor.get(), &Technic::TechnicPackProcessor::failed, this, &Technic::SolderPackInstallTask::emitFailed);
- packProcessor->run(m_globalSettings, m_instName, m_instIcon, m_stagingPath, m_minecraftVersion, true);
+ packProcessor->run(m_globalSettings, name(), m_instIcon, m_stagingPath, m_minecraftVersion, true);
}
void Technic::SolderPackInstallTask::extractAborted()
diff --git a/launcher/modplatform/technic/SolderPackInstallTask.h b/launcher/modplatform/technic/SolderPackInstallTask.h
index 117a7bd6..aa14ce88 100644
--- a/launcher/modplatform/technic/SolderPackInstallTask.h
+++ b/launcher/modplatform/technic/SolderPackInstallTask.h
@@ -61,6 +61,7 @@ namespace Technic
void downloadSucceeded();
void downloadFailed(QString reason);
void downloadProgressChanged(qint64 current, qint64 total);
+ void downloadAborted();
void extractFinished();
void extractAborted();