aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-25 16:37:10 -0300
committerSefa Eyeoglu <contact@scrumplex.net>2022-07-26 20:33:33 +0200
commite741cb7f0aa651b4f7245aed988ff510c7f8e2f9 (patch)
treeca51f9d9e0f68688c5e442b38ccd327bbfc73f86 /launcher
parentfb289c6b1770f43aaeca79df435d72332ad237c3 (diff)
downloadPrismLauncher-e741cb7f0aa651b4f7245aed988ff510c7f8e2f9.tar.gz
PrismLauncher-e741cb7f0aa651b4f7245aed988ff510c7f8e2f9.tar.bz2
PrismLauncher-e741cb7f0aa651b4f7245aed988ff510c7f8e2f9.zip
fix: add abort handlign in Flame's FileResolvingTask
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/flame/FileResolvingTask.cpp7
-rw-r--r--launcher/modplatform/flame/FileResolvingTask.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index c1f56658..058d2471 100644
--- a/launcher/modplatform/flame/FileResolvingTask.cpp
+++ b/launcher/modplatform/flame/FileResolvingTask.cpp
@@ -7,6 +7,13 @@ Flame::FileResolvingTask::FileResolvingTask(const shared_qobject_ptr<QNetworkAcc
: m_network(network), m_toProcess(toProcess)
{}
+bool Flame::FileResolvingTask::abort()
+{
+ if (m_dljob)
+ return m_dljob->abort();
+ return true;
+}
+
void Flame::FileResolvingTask::executeTask()
{
setStatus(tr("Resolving mod IDs..."));
diff --git a/launcher/modplatform/flame/FileResolvingTask.h b/launcher/modplatform/flame/FileResolvingTask.h
index 87981f0a..f71b87ce 100644
--- a/launcher/modplatform/flame/FileResolvingTask.h
+++ b/launcher/modplatform/flame/FileResolvingTask.h
@@ -13,6 +13,9 @@ public:
explicit FileResolvingTask(const shared_qobject_ptr<QNetworkAccessManager>& network, Flame::Manifest &toProcess);
virtual ~FileResolvingTask() {};
+ bool canAbort() const override { return true; }
+ bool abort() override;
+
const Flame::Manifest &getResults() const
{
return m_toProcess;