From d5c448931344a6cee5f89fddf9a8e64dec1f8da6 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Tue, 6 Jul 2021 15:12:39 +0100 Subject: GH-1949 Allow Technic pack downloads to be aborted This supports both 'single zip' modpacks and Solder packs, through the Technic mod platform page. --- api/logic/modplatform/technic/SingleZipPackInstallTask.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api/logic/modplatform/technic/SingleZipPackInstallTask.h') diff --git a/api/logic/modplatform/technic/SingleZipPackInstallTask.h b/api/logic/modplatform/technic/SingleZipPackInstallTask.h index c56b9e46..ec2ff605 100644 --- a/api/logic/modplatform/technic/SingleZipPackInstallTask.h +++ b/api/logic/modplatform/technic/SingleZipPackInstallTask.h @@ -36,6 +36,9 @@ class MULTIMC_LOGIC_EXPORT SingleZipPackInstallTask : public InstanceTask public: SingleZipPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion); + bool canAbort() const override { return true; } + bool abort() override; + protected: void executeTask() override; @@ -48,6 +51,8 @@ private slots: void extractAborted(); private: + bool m_abortable = false; + QUrl m_sourceUrl; QString m_minecraftVersion; QString m_archivePath; -- cgit