diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-31 11:50:02 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:17 +0100 |
| commit | 2ed9db7aab5d60bc419787dad53a491a62ef15e7 (patch) | |
| tree | 573b276d047479c70c5a3cc1c8aaa91f1ca107d5 /src/modlistview.cpp | |
| parent | a27656dc7bd14d22d0d8f9fe04f0365f95d81906 (diff) | |
Move creations of actions to ModListView.
Diffstat (limited to 'src/modlistview.cpp')
| -rw-r--r-- | src/modlistview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 092ded09..40959e6d 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -620,16 +620,18 @@ void ModListView::updateGroupByProxy(int groupIndex) }
}
-void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, ModListViewActions* actions, Ui::MainWindow* mwui)
+
+void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, FilterList& filters, MainWindow* mw, Ui::MainWindow* mwui)
{
// attributes
m_core = &core;
m_categories = &factory;
- m_actions = actions;
+ m_actions = new ModListViewActions(core, filters, factory, mw, this);
ui = { mwui->groupCombo, mwui->activeModsCounter, mwui->modFilterEdit, mwui->clearFiltersButton };
connect(m_core, &OrganizerCore::modInstalled, this, &ModListView::onModInstalled);
connect(core.modList(), &ModList::modPrioritiesChanged, this, &ModListView::onModPrioritiesChanged);
+ connect(core.modList(), &ModList::clearOverwrite, m_actions, &ModListViewActions::clearOverwrite);
m_byPriorityProxy = new ModListByPriorityProxy(core.currentProfile(), core, this);
m_byPriorityProxy->setSourceModel(core.modList());
|
