change: add enable/disable to resources

TIL that zip resource packs, when disabled, actually have the effect of
not showing up in the game at all. Since this can be useful to someone,
I moved the logic for it to the resources.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-08-13 11:58:39 -03:00
parent c3ceefbafb
commit e2ab2aea32
13 changed files with 231 additions and 168 deletions

View File

@ -77,7 +77,6 @@ public:
ModFolderModel(const QString &dir, bool is_indexed = false);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int columnCount(const QModelIndex &parent) const override;
@ -91,9 +90,6 @@ public:
/// Deletes all the selected mods
bool deleteMods(const QModelIndexList &indexes);
/// Enable or disable listed mods
bool setModStatus(const QModelIndexList &indexes, ModStatusAction action);
bool isValid();
bool startWatching() override;
@ -111,9 +107,6 @@ slots:
void onUpdateSucceeded() override;
void onParseSucceeded(int ticket, QString resource_id) override;
private:
bool setModStatus(int index, ModStatusAction action);
protected:
bool m_is_indexed;
bool m_first_folder_load = true;