summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/legacy
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-08-14 02:33:31 +0200
committerPetr Mrázek <peterix@gmail.com>2016-08-14 23:22:54 +0200
commit042f3ef55c0b469f438542152c4eb02b0789ea3c (patch)
tree03e0c15b200786558babd0fe58edac88ed1bfd1e /api/logic/minecraft/legacy
parent2f0441b3c1cd9fc3bcb176d2852da8f92a6e6777 (diff)
downloadMultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.gz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.lz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.xz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.zip
GH-352 Make OneSix instance update downloads cancellable
Diffstat (limited to 'api/logic/minecraft/legacy')
-rw-r--r--api/logic/minecraft/legacy/LegacyInstance.cpp4
-rw-r--r--api/logic/minecraft/legacy/LegacyInstance.h2
2 files changed, 3 insertions, 3 deletions
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<Task> LegacyInstance::createUpdateTask()
+shared_qobject_ptr<Task> 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<Task>(new LegacyUpdate(this, this));
+ return shared_qobject_ptr<Task>(new LegacyUpdate(this, this));
}
std::shared_ptr<Task> 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<Task> createUpdateTask() override;
+ virtual shared_qobject_ptr<Task> createUpdateTask() override;
virtual std::shared_ptr<Task> createJarModdingTask() override;
virtual QString createLaunchScript(AuthSessionPtr session) override;