Skip to content

Commit

Permalink
Merge pull request #4396 from Be-ing/mixxxmainwindow_qt6
Browse files Browse the repository at this point in the history
do not build MixxxMainWindow with Qt6
  • Loading branch information
uklotzde authored Oct 13, 2021
2 parents b040f00 + 3124263 commit 9a446a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/mixer/samplerbank.cpp
src/coreservices.cpp
src/mixxxapplication.cpp
src/mixxxmainwindow.cpp
src/musicbrainz/chromaprinter.cpp
src/musicbrainz/crc.cpp
src/musicbrainz/gzip.cpp
Expand Down Expand Up @@ -936,6 +935,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
)
if(NOT QT6)
target_sources(mixxx-lib PRIVATE
src/mixxxmainwindow.cpp
src/skin/legacy/colorschemeparser.cpp
src/skin/legacy/imgcolor.cpp
src/skin/legacy/imginvert.cpp
Expand Down
9 changes: 8 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#include "coreservices.h"
#include "errordialoghandler.h"
#include "mixxxapplication.h"
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include "mixxxmainwindow.h"
#endif
#include "qml/qmlapplication.h"
#include "sources/soundsourceproxy.h"
#include "util/cmdlineargs.h"
Expand All @@ -34,10 +36,14 @@ int runMixxx(MixxxApplication* pApp, const CmdlineArgs& args) {
CmdlineArgs::Instance().parseForUserFeedback();

int exitCode;

// TODO: remove --qml command line option and make QML only available
// with Qt6 when Mixxx can build with Qt6.
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if (args.getQml()) {
#endif
mixxx::qml::QmlApplication qmlApplication(pApp, pCoreServices);
exitCode = pApp->exec();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
} else {
// This scope ensures that `MixxxMainWindow` is destroyed *before*
// CoreServices is shut down. Otherwise a debug assertion complaining about
Expand Down Expand Up @@ -65,6 +71,7 @@ int runMixxx(MixxxApplication* pApp, const CmdlineArgs& args) {
exitCode = pApp->exec();
}
}
#endif
return exitCode;
}

Expand Down

0 comments on commit 9a446a0

Please sign in to comment.