diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-02 14:41:10 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-23 22:42:35 +0200 |
commit | 506b4093b47f8ecf29c2e1e83e73e47e9ac767ad (patch) | |
tree | a3d9ac6d0e4b23b925f1df677178ac8cdde295d6 /tests/auto/quick/qquickitem | |
parent | f6393ed0e4608bad4653f524c188bdc928e2d3b7 (diff) |
Remove usages of deprecated APIs of QWheelEvent
Task-number: QTBUG-76491
Change-Id: I69b0c4ec7c03f9421b18828516e064eff2b45518
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickitem')
-rw-r--r-- | tests/auto/quick/qquickitem/tst_qquickitem.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index 7e132f97b6..b6e40d5117 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -83,8 +83,8 @@ protected: event->accept(); ++wheelCount; timestamp = event->timestamp(); - lastWheelEventPos = event->pos(); - lastWheelEventGlobalPos = event->globalPos(); + lastWheelEventPos = event->position().toPoint(); + lastWheelEventGlobalPos = event->globalPosition().toPoint(); } }; @@ -1462,7 +1462,8 @@ void tst_qquickitem::wheelEvent() QPoint localPoint(width / 2, height / 2); QPoint globalPoint = window.mapToGlobal(localPoint); - QWheelEvent event(localPoint, globalPoint, -120, Qt::NoButton, Qt::NoModifier, Qt::Vertical); + QWheelEvent event(localPoint, globalPoint, QPoint(0, 0), QPoint(0, -120), + Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); event.setTimestamp(123456UL); event.setAccepted(false); QGuiApplication::sendEvent(&window, &event); |