summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/minecraft')
-rw-r--r--api/logic/minecraft/legacy/LegacyUpgradeTask.cpp7
-rw-r--r--api/logic/minecraft/legacy/LegacyUpgradeTask.h12
2 files changed, 5 insertions, 14 deletions
diff --git a/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp b/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp
index 9fc6d92b..5cc3b5d9 100644
--- a/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp
+++ b/api/logic/minecraft/legacy/LegacyUpgradeTask.cpp
@@ -10,12 +10,9 @@
#include "minecraft/ComponentList.h"
#include "classparser.h"
-LegacyUpgradeTask::LegacyUpgradeTask(SettingsObjectPtr settings, const QString & stagingPath, InstancePtr origInstance, const QString & newName)
+LegacyUpgradeTask::LegacyUpgradeTask(InstancePtr origInstance)
{
- m_globalSettings = settings;
- m_stagingPath = stagingPath;
m_origInstance = origInstance;
- m_newName = newName;
}
void LegacyUpgradeTask::executeTask()
@@ -70,7 +67,7 @@ void LegacyUpgradeTask::copyFinished()
// NOTE: this scope ensures the instance is fully saved before we emitSucceeded
{
MinecraftInstance inst(m_globalSettings, instanceSettings, m_stagingPath);
- inst.setName(m_newName);
+ inst.setName(m_instName);
inst.init();
QString preferredVersionNumber = decideVersion(legacyInst->currentVersionId(), legacyInst->intendedVersionId());
diff --git a/api/logic/minecraft/legacy/LegacyUpgradeTask.h b/api/logic/minecraft/legacy/LegacyUpgradeTask.h
index 56896385..a93dd0d9 100644
--- a/api/logic/minecraft/legacy/LegacyUpgradeTask.h
+++ b/api/logic/minecraft/legacy/LegacyUpgradeTask.h
@@ -1,6 +1,6 @@
#pragma once
-#include "tasks/Task.h"
+#include "InstanceTask.h"
#include "multimc_logic_export.h"
#include "net/NetJob.h"
#include <QUrl>
@@ -13,11 +13,11 @@
class BaseInstanceProvider;
-class MULTIMC_LOGIC_EXPORT LegacyUpgradeTask : public Task
+class MULTIMC_LOGIC_EXPORT LegacyUpgradeTask : public InstanceTask
{
Q_OBJECT
public:
- explicit LegacyUpgradeTask(SettingsObjectPtr settings, const QString & stagingPath, InstancePtr origInstance, const QString & newName);
+ explicit LegacyUpgradeTask(InstancePtr origInstance);
protected:
//! Entry point for tasks.
@@ -26,13 +26,7 @@ protected:
void copyAborted();
private: /* data */
- SettingsObjectPtr m_globalSettings;
InstancePtr m_origInstance;
- QString m_stagingPath;
- QString m_newName;
QFuture<bool> m_copyFuture;
QFutureWatcher<bool> m_copyFutureWatcher;
};
-
-
-