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/mainwindow.cpp | |
| parent | a27656dc7bd14d22d0d8f9fe04f0365f95d81906 (diff) | |
Move creations of actions to ModListView.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index caf533f2..2ca15b00 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -533,12 +533,10 @@ MainWindow::MainWindow(Settings &settings void MainWindow::setupModList() { - auto* actions = new ModListViewActions(m_OrganizerCore, *m_Filters, m_CategoryFactory, this, ui->modList); - ui->modList->setup(m_OrganizerCore, m_CategoryFactory, actions, ui); + ui->modList->setup(m_OrganizerCore, m_CategoryFactory, *m_Filters, this, ui); - connect(actions, &ModListViewActions::overwriteCleared, [=]() { scheduleCheckForProblems(); }); - connect(actions, &ModListViewActions::originModified, this, &MainWindow::originModified); - connect(m_OrganizerCore.modList(), &ModList::clearOverwrite, actions, &ModListViewActions::clearOverwrite); + connect(&ui->modList->actions(), &ModListViewActions::overwriteCleared, [=]() { scheduleCheckForProblems(); }); + connect(&ui->modList->actions(), &ModListViewActions::originModified, this, &MainWindow::originModified); connect(m_OrganizerCore.modList(), &ModList::modPrioritiesChanged, [&]() { m_ArchiveListWriter.write(); }); // keep here for now |
