diff options
Diffstat (limited to 'api/logic/minecraft/legacy/LegacyUpgradeTask.h')
-rw-r--r-- | api/logic/minecraft/legacy/LegacyUpgradeTask.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/api/logic/minecraft/legacy/LegacyUpgradeTask.h b/api/logic/minecraft/legacy/LegacyUpgradeTask.h new file mode 100644 index 00000000..56896385 --- /dev/null +++ b/api/logic/minecraft/legacy/LegacyUpgradeTask.h @@ -0,0 +1,38 @@ +#pragma once + +#include "tasks/Task.h" +#include "multimc_logic_export.h" +#include "net/NetJob.h" +#include <QUrl> +#include <QFuture> +#include <QFutureWatcher> +#include "settings/SettingsObject.h" +#include "BaseVersion.h" +#include "BaseInstance.h" + + +class BaseInstanceProvider; + +class MULTIMC_LOGIC_EXPORT LegacyUpgradeTask : public Task +{ + Q_OBJECT +public: + explicit LegacyUpgradeTask(SettingsObjectPtr settings, const QString & stagingPath, InstancePtr origInstance, const QString & newName); + +protected: + //! Entry point for tasks. + virtual void executeTask() override; + void copyFinished(); + void copyAborted(); + +private: /* data */ + SettingsObjectPtr m_globalSettings; + InstancePtr m_origInstance; + QString m_stagingPath; + QString m_newName; + QFuture<bool> m_copyFuture; + QFutureWatcher<bool> m_copyFutureWatcher; +}; + + + |