More generalistaion for ResourceFolderModels

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2023-09-01 00:27:05 +01:00
parent 93876e27f8
commit ee48766996
13 changed files with 90 additions and 152 deletions

View File

@ -74,18 +74,8 @@ class ModFolderModel : public ResourceFolderModel {
[[nodiscard]] Resource* createResource(const QFileInfo& file) override { return new Mod(file); }
[[nodiscard]] Task* createParseTask(Resource&) override;
bool installMod(QString file_path) { return ResourceFolderModel::installResource(file_path); }
bool installMod(QString file_path, ModPlatform::IndexedVersion& vers);
bool uninstallMod(const QString& filename, bool preserve_metadata = false);
/// Deletes all the selected mods
bool deleteMods(const QModelIndexList& indexes);
bool isValid();
bool startWatching() override;
bool stopWatching() override;
auto selectedMods(QModelIndexList& indexes) -> QList<Mod*>;
auto allMods() -> QList<Mod*>;