Skip to content

Commit

Permalink
conditional for qt < 6.3 QMutableEventPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Jan 14, 2024
1 parent 1627146 commit 5f41bff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tools/QtTestBrowser/launcherwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,22 @@ bool LauncherWindow::eventFilter(QObject* obj, QEvent* event)
// If the keyboard point is already pressed, release it.
// Otherwise create it and append to m_touchPoints.
if (m_touchPoints.size() > 0 && m_touchPoints[0].id() == 1) {
#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0)
QMutableEventPoint point = m_touchPoints[0];
point.setState(QEventPoint::Released);
m_touchPoints[0] = point;
#else
QMutableEventPoint::setState(m_touchPoints[0], QEventPoint::Released);
#endif
sendTouchEvent();
} else if (m_touchPoints.size() > 1 && m_touchPoints[1].id() == 1) {
#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0)
QMutableEventPoint point = m_touchPoints[0];
point.setState(QEventPoint::Released);
m_touchPoints[1] = point;
#else
QMutableEventPoint::setState(m_touchPoints[1], QEventPoint::Released);
#endif
sendTouchEvent();
} else {
QEventPoint touchPoint(1, QEventPoint::Pressed, m_view->mapFromGlobal(QCursor::pos()), QCursor::pos());
Expand Down

0 comments on commit 5f41bff

Please sign in to comment.