From 12c9c8708ab4a936d3827719bc1d7d69d9909d48 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Wed, 4 Aug 2021 13:38:56 +0200 Subject: [PATCH] MixxxMainWindow: Remove QApplication dependency --- src/main.cpp | 3 ++- src/mixxxmainwindow.cpp | 5 +---- src/mixxxmainwindow.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0759876d178..e0997d2519e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,8 @@ int runMixxx(MixxxApplication* pApp, const CmdlineArgs& args) { CmdlineArgs::Instance().parseForUserFeedback(); - MixxxMainWindow mainWindow(pApp, pCoreServices); + MixxxMainWindow mainWindow(pCoreServices); + pApp->processEvents(); pApp->installEventFilter(&mainWindow); QObject::connect(pCoreServices.get(), diff --git a/src/mixxxmainwindow.cpp b/src/mixxxmainwindow.cpp index 09c378e4f42..437cb6c95ed 100644 --- a/src/mixxxmainwindow.cpp +++ b/src/mixxxmainwindow.cpp @@ -90,8 +90,7 @@ #undef min #endif -MixxxMainWindow::MixxxMainWindow( - QApplication* pApp, std::shared_ptr pCoreServices) +MixxxMainWindow::MixxxMainWindow(std::shared_ptr pCoreServices) : m_pCoreServices(pCoreServices), m_pCentralWidget(nullptr), m_pLaunchImage(nullptr), @@ -103,7 +102,6 @@ MixxxMainWindow::MixxxMainWindow( m_pLibraryExporter(nullptr), #endif m_toolTipsCfg(mixxx::TooltipsPreference::TOOLTIPS_ON) { - DEBUG_ASSERT(pApp); DEBUG_ASSERT(pCoreServices); // These depend on the settings createMenuBar(); @@ -118,7 +116,6 @@ MixxxMainWindow::MixxxMainWindow( setCentralWidget(m_pCentralWidget); show(); - pApp->processEvents(); m_pGuiTick = new GuiTick(); m_pVisualsManager = new VisualsManager(); diff --git a/src/mixxxmainwindow.h b/src/mixxxmainwindow.h index d3a1d8f9f84..ab7940d29fa 100644 --- a/src/mixxxmainwindow.h +++ b/src/mixxxmainwindow.h @@ -47,7 +47,7 @@ class LibraryExporter; class MixxxMainWindow : public QMainWindow { Q_OBJECT public: - MixxxMainWindow(QApplication* app, std::shared_ptr pCoreServices); + MixxxMainWindow(std::shared_ptr pCoreServices); ~MixxxMainWindow() override; /// Initialize main window after creation. Should only be called once.