Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MixxxMainWindow: Remove QApplication dependency #4173

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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