diff options
| -rw-r--r-- | src/mainwindow.cpp | 12 | ||||
| -rw-r--r-- | src/organizercore.cpp | 15 |
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); |
