summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 13:27:21 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:40:12 +0100
commit42586639a8f17a19779cb646f1327dd92b18d135 (patch)
tree21dbd667afd248149ed9b3216173d7e2ecbd2597 /src
parentd86dec53822e049954d03ba18473dae08d74040f (diff)
Move connection from organizer to mainwindow.
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp12
-rw-r--r--src/organizercore.cpp15
2 files changed, 12 insertions, 15 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b979be86..6929a009 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -464,6 +464,18 @@ MainWindow::MainWindow(Settings &settings
m_Tutorial.expose("espList", m_OrganizerCore.pluginList());
m_OrganizerCore.setUserInterface(this);
+ connect(m_OrganizerCore.modList(), &ModList::showMessage,
+ [=](auto&& message) { showMessage(message); });
+ connect(m_OrganizerCore.modList(), &ModList::modRenamed,
+ [=](auto&& oldName, auto&& newName) { modRenamed(oldName, newName); });
+ connect(m_OrganizerCore.modList(), &ModList::modUninstalled,
+ [=](auto&& name) { modRemoved(name); });
+ connect(m_OrganizerCore.modList(), &ModList::fileMoved,
+ [=](auto&& ...args) { fileMoved(args...); });
+ connect(m_OrganizerCore.installationManager(), &InstallationManager::modReplaced,
+ [=](auto&& name) { modRemoved(name); });
+ connect(m_OrganizerCore.downloadManager(), &DownloadManager::showMessage,
+ [=](auto&& message) { showMessage(message); });
for (const QString &fileName : m_PluginContainer.pluginFileNames()) {
installTranslator(QFileInfo(fileName).baseName());
}
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 2b1cbdc6..6eb81792 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -235,21 +235,6 @@ void OrganizerCore::setUserInterface(IUserInterface* ui)
w = m_UserInterface->mainWindow();
}
- if (w) {
- connect(&m_ModList, SIGNAL(showMessage(QString)), w,
- SLOT(showMessage(QString)));
- connect(&m_ModList, SIGNAL(modRenamed(QString, QString)), w,
- SLOT(modRenamed(QString, QString)));
- connect(&m_ModList, SIGNAL(modUninstalled(QString)), w,
- SLOT(modRemoved(QString)));
- connect(&m_InstallationManager, SIGNAL(modReplaced(QString)), w,
- SLOT(modRemoved(QString)));
- connect(&m_ModList, SIGNAL(fileMoved(QString, QString, QString)), w,
- SLOT(fileMoved(QString, QString, QString)));
- connect(&m_DownloadManager, SIGNAL(showMessage(QString)), w,
- SLOT(showMessage(QString)));
- }
-
m_InstallationManager.setParentWidget(w);
m_Updater.setUserInterface(w);
m_UILocker.setUserInterface(w);