Skip to content

Commit

Permalink
MixxxApplication: do not build hacks for touch input with Qt6
Browse files Browse the repository at this point in the history
These hacks were to simulate mouse input with touch input
with the legacy QWidgets GUI. They do not build with Qt6 and
are not needed with QML.
  • Loading branch information
Be-ing committed Oct 13, 2021
1 parent 0a94d35 commit e312eb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mixxxapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Q_IMPORT_PLUGIN(QJpegPlugin)
Q_IMPORT_PLUGIN(QGifPlugin)
#endif // QT_STATIC

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
namespace {

/// This class allows to change the button of a mouse event on the fly.
Expand All @@ -53,6 +54,7 @@ class QMouseEventEditable : public QMouseEvent {
};

} // anonymous namespace
#endif

MixxxApplication::MixxxApplication(int& argc, char** argv)
: QApplication(argc, argv),
Expand Down Expand Up @@ -103,6 +105,7 @@ void MixxxApplication::registerMetaTypes() {
qRegisterMetaType<mixxx::FileInfo>("mixxx::FileInfo");
}

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
bool MixxxApplication::notify(QObject* target, QEvent* event) {
// All touch events are translated into two simultaneous events: one for
// the target QWidgetWindow and one for the target QWidget.
Expand Down Expand Up @@ -147,3 +150,4 @@ bool MixxxApplication::touchIsRightButton() {
}
return m_pTouchShift->toBool();
}
#endif

0 comments on commit e312eb6

Please sign in to comment.