Skip to content
Closed
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
33 changes: 18 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -776,20 +776,6 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/preferences/settingsmanager.cpp
src/preferences/upgrade.cpp
src/recording/recordingmanager.cpp
src/qml/asyncimageprovider.cpp
src/qml/qmlapplication.cpp
src/qml/qmlcontrolproxy.cpp
src/qml/qmlconfigproxy.cpp
src/qml/qmldlgpreferencesproxy.cpp
src/qml/qmleffectmanifestparametersmodel.cpp
src/qml/qmleffectsmanagerproxy.cpp
src/qml/qmleffectslotproxy.cpp
src/qml/qmllibraryproxy.cpp
src/qml/qmllibrarytracklistmodel.cpp
src/qml/qmlplayermanagerproxy.cpp
src/qml/qmlplayerproxy.cpp
src/qml/qmlvisibleeffectsmodel.cpp
src/qml/qmlwaveformoverview.cpp
src/skin/legacy/skincontext.cpp
src/skin/legacy/tooltips.cpp
src/skin/skinloader.cpp
Expand Down Expand Up @@ -904,7 +890,24 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/util/workerthreadscheduler.cpp
src/util/xml.cpp
)
if(NOT QT6)
if(QT6)
target_sources(mixxx-lib PRIVATE
src/qml/asyncimageprovider.cpp
src/qml/qmlapplication.cpp
src/qml/qmlcontrolproxy.cpp
src/qml/qmlconfigproxy.cpp
src/qml/qmldlgpreferencesproxy.cpp
src/qml/qmleffectmanifestparametersmodel.cpp
src/qml/qmleffectsmanagerproxy.cpp
src/qml/qmleffectslotproxy.cpp
src/qml/qmllibraryproxy.cpp
src/qml/qmllibrarytracklistmodel.cpp
src/qml/qmlplayermanagerproxy.cpp
src/qml/qmlplayerproxy.cpp
src/qml/qmlvisibleeffectsmodel.cpp
src/qml/qmlwaveformoverview.cpp
)
else()
target_sources(mixxx-lib PRIVATE
src/library/banshee/bansheedbconnection.cpp
src/library/banshee/bansheefeature.cpp
Expand Down
28 changes: 13 additions & 15 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
#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"
#include "util/console.h"
#include "util/logging.h"
#include "util/versionstore.h"

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include "qml/qmlapplication.h"
#else
#include "mixxxmainwindow.h"
#endif

namespace {

// Exit codes
Expand All @@ -36,18 +38,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
// This scope ensures that the main window is destroyed *before*
// CoreServices is shut down. Otherwise a debug assertion complaining about
// leaked COs may be triggered.
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
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
// leaked COs may be triggered.
#else
MixxxMainWindow mainWindow(pCoreServices);
pApp->processEvents();
pApp->installEventFilter(&mainWindow);
Expand All @@ -70,8 +68,8 @@ int runMixxx(MixxxApplication* pApp, const CmdlineArgs& args) {
qDebug() << "Running Mixxx";
exitCode = pApp->exec();
}
}
#endif
}
return exitCode;
}

Expand Down
7 changes: 0 additions & 7 deletions src/util/cmdlineargs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,6 @@ bool CmdlineArgs::parse(const QStringList& arguments, CmdlineArgs::ParseMode mod
: QString());
parser.addOption(developer);

const QCommandLineOption qml(QStringLiteral("qml"),
forUserFeedback ? QCoreApplication::translate("CmdlineArgs",
"Loads experimental QML GUI instead of legacy QWidget skin")
: QString());
parser.addOption(qml);

const QCommandLineOption safeMode(QStringLiteral("safe-mode"),
forUserFeedback ? QCoreApplication::translate("CmdlineArgs",
"Enables safe-mode. Disables OpenGL waveforms, and "
Expand Down Expand Up @@ -327,7 +321,6 @@ bool CmdlineArgs::parse(const QStringList& arguments, CmdlineArgs::ParseMode mod

m_midiDebug = parser.isSet(controllerDebug) || parser.isSet(controllerDebugDeprecated);
m_developer = parser.isSet(developer);
m_qml = parser.isSet(qml);
m_safeMode = parser.isSet(safeMode) || parser.isSet(safeModeDeprecated);
m_debugAssertBreak = parser.isSet(debugAssertBreak) || parser.isSet(debugAssertBreakDeprecated);

Expand Down
4 changes: 0 additions & 4 deletions src/util/cmdlineargs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class CmdlineArgs final {
bool getStartInFullscreen() const { return m_startInFullscreen; }
bool getMidiDebug() const { return m_midiDebug; }
bool getDeveloper() const { return m_developer; }
bool getQml() const {
return m_qml;
}
bool getSafeMode() const { return m_safeMode; }
bool useColors() const {
return m_useColors;
Expand Down Expand Up @@ -72,7 +69,6 @@ class CmdlineArgs final {
bool m_startInFullscreen; // Start in fullscreen mode
bool m_midiDebug;
bool m_developer; // Developer Mode
bool m_qml;
bool m_safeMode;
bool m_debugAssertBreak;
bool m_settingsPathSet; // has --settingsPath been set on command line ?
Expand Down