diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-04 11:40:55 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-04 11:57:37 +0100 |
commit | a5ddb82ab49dca5fb2873963c87c4acfcb5cecdf (patch) | |
tree | 4ce6b3fdf99e946e4674377cf8cff9f992c88de3 /tests | |
parent | e71818f7700d0e9b1f40dfa8a0f154e9d01e701c (diff) |
Filter touch presses and releases in QQDrawer::childMouseEventFilter()
For pressPoint to be set, we must enter QQuickPopupPrivate::handlePress()
but until now, Drawer has filtered a synthetic mouse press in order to
get there. Now that Flickable is handling touch events directly, we
have a new rule that if an item has acceptTouchEvents() == true, and
also filters mouse or touch events, then it must filter touch events:
QQuickWindowPrivate::sendFilteredPointerEventImpl() no longer constructs
a synth-mouse event for that item, because it has declared that it
knows how to handle touch events. This rule applies to Drawer.
Setting pressPoint is also unnecessary, because it should always be the
same as QEventPoint::scenePressPosition(). But refactoring all functions
like handlePress(QQuickItem *item, const QPointF &point, ulong timestamp)
(and handleMove and handleRelease) to take QEventPoint instead will be
a larger refactoring.
But until then, when pressPoint is not set, QQuickDrawerPrivate::grabTouch()
usually sees the drag threshold being exceeded when it compares the
current scene position against 0,0 which is why it takes the grab
from some control inside (e.g. Slider).
Fixes: QTBUG-88170
Change-Id: Ia88aed59695feb3d5fdabbbf276241e427ac9d89
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions