aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-11 16:53:00 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-11 20:52:51 +0100
commitc48b0902b56a62808e78b10d89435e85b840c8dc (patch)
tree798bc51ceecb674cfffa5c2a129fa1a0ab8e8d19
parentc398e6701d15d13efe242085f51c59722e32d037 (diff)
tst_qquickwindow: construct pointer events with proper devices
In the QQuickPointerMouseEvent constructor, the device pointer became mandatory mainly because it's mandatory in QQuickSinglePointEvent, because we want to ensure that we distinguish mouse from tablet events. Change-Id: I3d314c6877493b8b5b6407f5eb5631f7083900a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index bf58ce961c..0bf83c267a 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -2860,7 +2860,7 @@ void tst_qquickwindow::pointerEventTypeAndPointCount()
QList<QTouchEvent::TouchPoint>() << QTouchEvent::TouchPoint(1));
- QQuickPointerMouseEvent pme;
+ QQuickPointerMouseEvent pme(nullptr, QQuickPointerDevice::genericMouseDevice());
pme.reset(&me);
QCOMPARE(pme.asMouseEvent(localPosition), &me);
QVERIFY(pme.asPointerMouseEvent());
@@ -2872,7 +2872,7 @@ void tst_qquickwindow::pointerEventTypeAndPointCount()
QCOMPARE(pme.asMouseEvent(localPosition)->localPos(), localPosition);
QCOMPARE(pme.asMouseEvent(localPosition)->screenPos(), screenPosition);
- QQuickPointerTouchEvent pte;
+ QQuickPointerTouchEvent pte(nullptr, QQuickPointerDevice::touchDevice(touchDevice));
pte.reset(&te);
QCOMPARE(pte.asTouchEvent(), &te);
QVERIFY(!pte.asPointerMouseEvent());