refactor(RD): decouple ResourceModels from ResourcePages
This makes it so that we don't need a reference to the parent page in the model. It will be useful once we change the page from a widget-based one to a QML page. It also makes tasks be created in the dialog instead of the page, so that the dialog can also have the necessary information to mark versions as selected / deselected easily. It also makes the task pointers into smart pointers. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -32,6 +32,7 @@ class ResourceDownloadTask : public SequentialTask {
|
||||
public:
|
||||
explicit ResourceDownloadTask(ModPlatform::IndexedPack pack, ModPlatform::IndexedVersion version, const std::shared_ptr<ResourceFolderModel> packs, bool is_indexed = true);
|
||||
const QString& getFilename() const { return m_pack_version.fileName; }
|
||||
const QVariant& getVersionID() const { return m_pack_version.fileId; }
|
||||
|
||||
private:
|
||||
ModPlatform::IndexedPack m_pack;
|
||||
|
Reference in New Issue
Block a user