From a30d49f4fc845164ef6bba4d2a834efce1dc01d7 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Fri, 4 Dec 2020 08:50:31 +0100 Subject: Avoid duplicating code to simulate startup. --- src/mainwindow.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8e08103f..a270fd10 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -512,8 +512,6 @@ MainWindow::MainWindow(Settings &settings m_Tutorial.expose("espList", m_OrganizerCore.pluginList()); m_OrganizerCore.setUserInterface(this); - m_PluginContainer.setUserInterface(this); - connect(this, &MainWindow::userInterfaceInitialized, &m_OrganizerCore, &OrganizerCore::userInterfaceInitialized); for (const QString &fileName : m_PluginContainer.pluginFileNames()) { installTranslator(QFileInfo(fileName).baseName()); } @@ -705,7 +703,6 @@ MainWindow::~MainWindow() try { cleanup(); - m_PluginContainer.setUserInterface(nullptr); m_OrganizerCore.setUserInterface(nullptr); if (m_IntegratedBrowser) { @@ -744,14 +741,6 @@ void MainWindow::onRequestsChanged(const APIStats& stats, const APIUserAccount& } -void MainWindow::disconnectPlugins() -{ - if (ui->actionTool->menu() != nullptr) { - ui->actionTool->menu()->clear(); - } -} - - void MainWindow::resizeLists(bool pluginListCustom) { // ensure the columns aren't so small you can't see them any more @@ -1413,8 +1402,8 @@ void MainWindow::showEvent(QShowEvent *event) m_WasVisible = true; updateProblemsButton(); - // Notify plugin that the UI is initialized: - emit userInterfaceInitialized(); + // Notify plugin that the MO2 is ready: + m_PluginContainer.startPlugins(this); } } -- cgit v1.3.1