From 042f3ef55c0b469f438542152c4eb02b0789ea3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 14 Aug 2016 02:33:31 +0200 Subject: GH-352 Make OneSix instance update downloads cancellable --- api/logic/minecraft/legacy/LegacyInstance.cpp | 4 ++-- api/logic/minecraft/legacy/LegacyInstance.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'api/logic/minecraft/legacy') diff --git a/api/logic/minecraft/legacy/LegacyInstance.cpp b/api/logic/minecraft/legacy/LegacyInstance.cpp index 7c552369..7ed2041c 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.cpp +++ b/api/logic/minecraft/legacy/LegacyInstance.cpp @@ -87,12 +87,12 @@ bool LegacyInstance::shouldUseCustomBaseJar() const } -std::shared_ptr LegacyInstance::createUpdateTask() +shared_qobject_ptr LegacyInstance::createUpdateTask() { // make sure the jar mods list is initialized by asking for it. auto list = jarModList(); // create an update task - return std::shared_ptr(new LegacyUpdate(this, this)); + return shared_qobject_ptr(new LegacyUpdate(this, this)); } std::shared_ptr LegacyInstance::createJarModdingTask() diff --git a/api/logic/minecraft/legacy/LegacyInstance.h b/api/logic/minecraft/legacy/LegacyInstance.h index f1cefbcc..1d95340b 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.h +++ b/api/logic/minecraft/legacy/LegacyInstance.h @@ -113,7 +113,7 @@ public: virtual bool shouldUpdate() const override; virtual void setShouldUpdate(bool val) override; - virtual std::shared_ptr createUpdateTask() override; + virtual shared_qobject_ptr createUpdateTask() override; virtual std::shared_ptr createJarModdingTask() override; virtual QString createLaunchScript(AuthSessionPtr session) override; -- cgit v1.2.3