From 968366c2aecb3337af281a01de56023ce5ffe2f9 Mon Sep 17 00:00:00 2001 From: flow Date: Sat, 12 Nov 2022 11:42:07 -0300 Subject: feat+fix: allow forwarding extra info to InstanceImportTask This allows us to pass to the creation instances their actual pack ID and version ID, that in Flame's case, are only available before starting to create an instance. Signed-off-by: flow --- launcher/InstanceImportTask.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'launcher/InstanceImportTask.h') diff --git a/launcher/InstanceImportTask.h b/launcher/InstanceImportTask.h index ef70c819..712ef054 100644 --- a/launcher/InstanceImportTask.h +++ b/launcher/InstanceImportTask.h @@ -56,7 +56,7 @@ class InstanceImportTask : public InstanceTask { Q_OBJECT public: - explicit InstanceImportTask(const QUrl sourceUrl, QWidget* parent = nullptr); + explicit InstanceImportTask(const QUrl sourceUrl, QWidget* parent = nullptr, QMap extra_info = {}); bool abort() override; const QVector &getBlockedFiles() const @@ -101,6 +101,10 @@ private: /* data */ Modrinth, } m_modpackType = ModpackType::Unknown; + // Extra info we might need, that's available before, but can't be derived from + // the source URL / the resource it points to alone. + QMap m_extra_info; + //FIXME: nuke QWidget* m_parent; }; -- cgit