Skip to content

Commit

Permalink
Merge pull request #4397 from Be-ing/touch_hacks_qt6
Browse files Browse the repository at this point in the history
MixxxApplication: do not build hacks for touch input with Qt6
  • Loading branch information
uklotzde authored Oct 13, 2021
2 parents df8b741 + e312eb6 commit b040f00
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 b040f00

Please sign in to comment.