diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-12 01:00:38 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-12-12 13:08:25 +0100 |
commit | 39643ef86e8bc48b8b6cf83ac0ebae7411029030 (patch) | |
tree | 79277e468160ebc04a65a85c9668dabefbf3ce33 /src/quick/items/qquickwindow.cpp | |
parent | 489d6c28dda51c187c85017e30c1e018420e26ac (diff) | |
parent | e3446c8225acbaa6a613d6c62e8e2fc58e2b70b0 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
Change-Id: Ic1dace832ad4b29023d24808b8617b5dcc915eb5
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index a09aa830fb..b5a68a2283 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2246,13 +2246,14 @@ QQuickPointerEvent *QQuickWindowPrivate::queryPointerEventInstance(QQuickPointer { // Search for a matching reusable event object. for (QQuickPointerEvent *e : pointerEventInstances) { - // If device can generate native gestures (e.g. a trackpad), there might be two QQuickPointerEvents: - // QQuickPointerNativeGestureEvent and QQuickPointerTouchEvent. Use eventType to disambiguate. + // If device can generate native gestures (e.g. a trackpad), there might be multiple QQuickPointerEvents: + // QQuickPointerNativeGestureEvent, QQuickPointerScrollEvent, and QQuickPointerTouchEvent. + // Use eventType to disambiguate. #if QT_CONFIG(gestures) - if (eventType == QEvent::NativeGesture && !qobject_cast<QQuickPointerNativeGestureEvent*>(e)) + if ((eventType == QEvent::NativeGesture) != bool(e->asPointerNativeGestureEvent())) continue; #endif - if (eventType == QEvent::Wheel && !qobject_cast<QQuickPointerScrollEvent*>(e)) + if ((eventType == QEvent::Wheel) != bool(e->asPointerScrollEvent())) continue; // Otherwise we assume there's only one event type per device. // More disambiguation tests might need to be added above if that changes later. |