diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-03-26 16:50:40 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-23 17:44:03 +0200 |
commit | d0ae3a312a03c118a1aa25a4c6c0352375d569fc (patch) | |
tree | 01df3e8ea22c8a1ecd969a6e9e6d7014c635da9f /tests/auto/quick/qquickmousearea | |
parent | d5d6a56809032796444fe63c220a2e940ce237c0 (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/qquickmousearea')
-rw-r--r-- | tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp index 5879fc6897..1d22680261 100644 --- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp +++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp @@ -94,14 +94,12 @@ class tst_QQuickMouseArea: public QQmlDataTest Q_OBJECT public: tst_QQuickMouseArea() - : device(nullptr) { qmlRegisterType<CircleMask>("Test", 1, 0, "CircleMask"); qmlRegisterType<EventSender>("Test", 1, 0, "EventSender"); } private slots: - void initTestCase() override; void dragProperties(); void resetDrag(); void dragging_data() { acceptedButton_data(); } @@ -166,22 +164,12 @@ private: } void acceptedButton_data(); void rejectedButton_data(); - QTouchDevice *device; + QPointingDevice *device = QTest::createTouchDevice(); }; Q_DECLARE_METATYPE(Qt::MouseButton) Q_DECLARE_METATYPE(Qt::MouseButtons) -void tst_QQuickMouseArea::initTestCase() -{ - QQmlDataTest::initTestCase(); - if (!device) { - device = new QTouchDevice; - device->setType(QTouchDevice::TouchScreen); - QWindowSystemInterface::registerTouchDevice(device); - } -} - void tst_QQuickMouseArea::acceptedButton_data() { QTest::addColumn<Qt::MouseButtons>("acceptedButtons"); |