aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/touchmouse
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-03-26 16:50:40 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-23 17:44:03 +0200
commitd0ae3a312a03c118a1aa25a4c6c0352375d569fc (patch)
tree01df3e8ea22c8a1ecd969a6e9e6d7014c635da9f /tests/auto/quick/touchmouse
parentd5d6a56809032796444fe63c220a2e940ce237c0 (diff)
Remove QQuickPointerDevice in favor of QPointingDevice
...and generally deal with changes immediately required after adding QInputDevice and QPointingDevice. Also fixed a few usages of deprecated accessors that weren't taken care of in 212c2bffbb041aee0e3c9a7f0551ef151ed2d3ad. Task-number: QTBUG-46412 Task-number: QTBUG-69433 Task-number: QTBUG-72167 Change-Id: I93a2643162878afa216556f10808fd92e0b20071 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/quick/touchmouse')
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index b0d31e9121..9117df812a 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -173,7 +173,6 @@ class tst_TouchMouse : public QQmlDataTest
Q_OBJECT
public:
tst_TouchMouse()
- :device(QTest::createTouchDevice())
{}
private slots:
@@ -218,7 +217,7 @@ protected:
private:
QQuickView *createView();
- QTouchDevice *device;
+ QPointingDevice *device = QTest::createTouchDevice();
QList<Event> filteredEventList;
};
@@ -613,7 +612,7 @@ void tst_TouchMouse::buttonOnFlickable()
QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window.data());
QVERIFY(windowPriv->touchMouseId != -1);
- auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
+ auto pointerEvent = windowPriv->pointerEventInstance(device);
QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), eventItem1);
QCOMPARE(window->mouseGrabberItem(), eventItem1);
@@ -674,7 +673,7 @@ void tst_TouchMouse::touchButtonOnFlickable()
QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window.data());
QVERIFY(windowPriv->touchMouseId == -1);
- auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
+ auto pointerEvent = windowPriv->pointerEventInstance(device);
QCOMPARE(pointerEvent->point(0)->grabberItem(), eventItem2);
QCOMPARE(window->mouseGrabberItem(), nullptr);
@@ -808,7 +807,7 @@ void tst_TouchMouse::buttonOnDelayedPressFlickable()
// for the touchMouseId to the new grabber.
QCOMPARE(window->mouseGrabberItem(), flickable);
QVERIFY(windowPriv->touchMouseId != -1);
- auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
+ auto pointerEvent = windowPriv->pointerEventInstance(device);
QCOMPARE(pointerEvent->point(0)->grabberItem(), flickable);
}
@@ -1464,10 +1463,6 @@ void tst_TouchMouse::touchPointDeliveryOrder()
void tst_TouchMouse::hoverEnabled()
{
- // QTouchDevice *device = new QTouchDevice;
- // device->setType(QTouchDevice::TouchScreen);
- // QWindowSystemInterface::registerTouchDevice(device);
-
QScopedPointer<QQuickView> window(createView());
window->setSource(testFileUrl("hoverMouseAreas.qml"));
QQuickViewTestUtil::centerOnScreen(window.data());