GH-1949 Allow Technic pack downloads to be aborted

This supports both 'single zip' modpacks and Solder packs, through the
Technic mod platform page.
This commit is contained in:
Jamie Mansfield
2021-07-06 15:12:39 +01:00
parent db392b4994
commit d5c4489313
4 changed files with 34 additions and 0 deletions

View File

@ -29,6 +29,9 @@ namespace Technic
public:
explicit SolderPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion);
bool canAbort() const override { return true; }
bool abort() override;
protected:
//! Entry point for tasks.
virtual void executeTask() override;
@ -43,6 +46,8 @@ namespace Technic
void extractAborted();
private:
bool m_abortable = false;
NetJobPtr m_filesNetJob;
QUrl m_sourceUrl;
QString m_minecraftVersion;