diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-26 21:34:02 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-29 20:29:00 +0100 |
commit | f128b5dee8a2a03ebc55ed0cd1e749a6599282c3 (patch) | |
tree | cd16b82ace97922f99a7c777ed851f08ced62e04 /src/quick/items/qquickitem.cpp | |
parent | cbb49ad30b5b5c1cc30531c6bd6c9fbcc4142da0 (diff) |
Fix qmltest::event tests
- Stationary points are delivered like updated points after
05dc0a387ae324f2d6f3d7e633a0a49473f6957a
- QQuickItemPrivate::localizedTouchEvent() seems to need to
detach QEventPoint instances with Released state, to avoid
losing the localization during delivery
- calling stationary() or release() without position causes
the event to occur at the middle of the item, not at the
last-known position as the test was expecting
Task-number: QTBUG-86729
Change-Id: I6bdcebc04a11d93d1d006f8269c1df2e9206a393
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index e7104b4361..d9abd2c76a 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -8430,6 +8430,8 @@ QTouchEvent QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, boo QEventPoint pCopy(p); QMutableEventPoint mut = QMutableEventPoint::from(pCopy); eventStates |= p.state(); + if (p.state() == QEventPoint::State::Released) + mut.detach(); mut.setPosition(localPos); touchPoints << mut; } |