Revert "Use Pressed/Released eventpoint state with native gesture begin/end"

This reverts commit 0336f08fec.

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 <shawn.rutledge@qt.io>
bb10
Fabian Kosmale 2021-06-03 21:21:03 +00:00
parent fd217e7f00
commit 57bb7cac64
1 changed files with 0 additions and 13 deletions

View File

@ -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;