summaryrefslogtreecommitdiffstats
path: root/api/logic/InstanceImportTask.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-20 05:22:04 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-20 05:22:04 +0200
commit6bd2605a79bec9267740f223c87d56d2263d98b8 (patch)
tree9ded863e6f84b52fd2c003e2dd1c22f19427658c /api/logic/InstanceImportTask.h
parente9a61995077eb15027cf3d044aa15a8cb67c13ae (diff)
downloadMultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar
MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.gz
MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.lz
MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.xz
MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.zip
NOISSUE add import from curse zip packs
Does not actually grab mods, but resolves them and prints the results in logs.
Diffstat (limited to 'api/logic/InstanceImportTask.h')
-rw-r--r--api/logic/InstanceImportTask.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/api/logic/InstanceImportTask.h b/api/logic/InstanceImportTask.h
index fe227e07..0bd7ddf8 100644
--- a/api/logic/InstanceImportTask.h
+++ b/api/logic/InstanceImportTask.h
@@ -7,8 +7,13 @@
#include <QFuture>
#include <QFutureWatcher>
#include "settings/SettingsObject.h"
+#include "QObjectPtr.h"
class BaseInstanceProvider;
+namespace Curse
+{
+ class FileResolvingTask;
+}
class MULTIMC_LOGIC_EXPORT InstanceImportTask : public Task
{
@@ -23,6 +28,8 @@ protected:
private:
void extractAndTweak();
+ void processMultiMC(const QFileInfo &config);
+ void processCurse(const QFileInfo &manifest);
private slots:
void downloadSucceeded();
@@ -30,14 +37,18 @@ private slots:
void downloadProgressChanged(qint64 current, qint64 total);
void extractFinished();
void extractAborted();
+ void curseResolvingSucceeded();
+ void curseResolvingFailed(QString reason);
private: /* data */
SettingsObjectPtr m_globalSettings;
NetJobPtr m_filesNetJob;
+ shared_qobject_ptr<Curse::FileResolvingTask> m_curseResolver;
QUrl m_sourceUrl;
BaseInstanceProvider * m_target;
QString m_archivePath;
bool m_downloadRequired = false;
+ QString m_packRoot;
QString m_instName;
QString m_instIcon;
QString m_instGroup;