From 57bb7cac64978f4949f2070e8666ea22bebdfadb Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 3 Jun 2021 21:21:03 +0000 Subject: [PATCH] Revert "Use Pressed/Released eventpoint state with native gesture begin/end" This reverts commit 0336f08fec906af7e907d07d990a097a9a1d8726. 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 --- src/gui/kernel/qevent.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index db4e2624fa1..4e6de35c94a 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -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;