Skip to content

Commit

Permalink
MixxxMainWindow: Remove QApplication dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Aug 4, 2021
1 parent fa1b0fd commit 12c9c87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
5 changes: 1 addition & 4 deletions src/mixxxmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@
#undef min
#endif

MixxxMainWindow::MixxxMainWindow(
QApplication* pApp, std::shared_ptr<mixxx::CoreServices> pCoreServices)
MixxxMainWindow::MixxxMainWindow(std::shared_ptr<mixxx::CoreServices> pCoreServices)
: m_pCoreServices(pCoreServices),
m_pCentralWidget(nullptr),
m_pLaunchImage(nullptr),
Expand All @@ -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();
Expand All @@ -118,7 +116,6 @@ MixxxMainWindow::MixxxMainWindow(
setCentralWidget(m_pCentralWidget);

show();
pApp->processEvents();

m_pGuiTick = new GuiTick();
m_pVisualsManager = new VisualsManager();
Expand Down
2 changes: 1 addition & 1 deletion src/mixxxmainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LibraryExporter;
class MixxxMainWindow : public QMainWindow {
Q_OBJECT
public:
MixxxMainWindow(QApplication* app, std::shared_ptr<mixxx::CoreServices> pCoreServices);
MixxxMainWindow(std::shared_ptr<mixxx::CoreServices> pCoreServices);
~MixxxMainWindow() override;

/// Initialize main window after creation. Should only be called once.
Expand Down

0 comments on commit 12c9c87

Please sign in to comment.