refactor: adapt rest of the codebase to the new resource model
In order to access the ModFolderModel from the ModFolderPage, i created a new m_model for the correct type, shadowing the m_model of type ResourceFolderModel. This creates two shared_ptr references to the same object, but since they will have the same lifetime, it doesn't generate a memory leak. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -55,9 +55,20 @@ class ModFolderPage : public ExternalResourcesPage {
|
||||
virtual bool shouldDisplay() const override;
|
||||
void runningStateChanged(bool running) override;
|
||||
|
||||
public slots:
|
||||
bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override;
|
||||
|
||||
void itemActivated(const QModelIndex& index) override;
|
||||
|
||||
void enableItem() override;
|
||||
void disableItem() override;
|
||||
|
||||
private slots:
|
||||
void installMods();
|
||||
void updateMods();
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ModFolderModel> m_model;
|
||||
};
|
||||
|
||||
class CoreModFolderPage : public ModFolderPage {
|
||||
|
Reference in New Issue
Block a user