feat: change task container in ModDownloadDialog to a QHash
Previously, we used a unique_ptr to a ModDownloadTask to keep track of the selected mod to download when we accepted the dialog. In order to allow multiple mods to be selected at once for download, this has been changed to a QHash where the key is the mods name (since it doesn't seem right to allow for multiple versions of the same mod to be downloaded at once), and the value is a pointer to the corresponding ModDownloadTask.
This commit is contained in:
parent
613b351f13
commit
9c6727e27f
4 changed files with 35 additions and 10 deletions
|
@ -10,6 +10,7 @@ class ModDownloadTask : public Task {
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit ModDownloadTask(const QUrl sourceUrl, const QString filename, const std::shared_ptr<ModFolderModel> mods);
|
||||
const QString& getFilename() const { return filename; }
|
||||
|
||||
public slots:
|
||||
bool abort() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue