Skip to content

Commit

Permalink
Revert "Use Pressed/Released eventpoint state with native gesture beg…
Browse files Browse the repository at this point in the history
…in/end"

This reverts commit 0336f08.

Reason for revert: This breaks tst_qquickpinchhandler;
We no longer seem to construct a QNativeGestureEvent of type
EndNativeGesture with it.

Change-Id: I942fa099d5c5a1c757accde0c67e407809ce2d72
Reviewed-by: Shawn Rutledge <[email protected]>
  • Loading branch information
Inkane committed Jun 3, 2021
1 parent fd217e7 commit 57bb7ca
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/gui/kernel/qevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2829,19 +2829,6 @@ QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPoin
m_sequenceId(sequenceId), m_deltas(deltas), m_realValue(value), m_gestureType(type), m_fingerCount(fingerCount)
{
Q_ASSERT(fingerCount < 16); // we store it in 4 bits unsigned

// make correction to QEventPoint::state(): the QSinglePointEvent ctor doesn't get gesture type, defaults to Updated
auto &pt = QMutableEventPoint::from(m_points.first());
switch (type) {
case Qt::BeginNativeGesture:
pt.setState(QEventPoint::State::Pressed);
break;
case Qt::EndNativeGesture:
pt.setState(QEventPoint::State::Released);
break;
default:
break;
}
}

QNativeGestureEvent::~QNativeGestureEvent() = default;
Expand Down

0 comments on commit 57bb7ca

Please sign in to comment.