From 506b4093b47f8ecf29c2e1e83e73e47e9ac767ad Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 2 Aug 2019 14:41:10 +0200 Subject: Remove usages of deprecated APIs of QWheelEvent Task-number: QTBUG-76491 Change-Id: I69b0c4ec7c03f9421b18828516e064eff2b45518 Reviewed-by: Shawn Rutledge --- tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp') diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index 2314b82e8c..c104eecbcd 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -874,7 +874,8 @@ void tst_qquickflickable::wheel() // test a vertical flick { QPoint pos(200, 200); - QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(0,-120), -120, Qt::Vertical, Qt::NoButton, Qt::NoModifier); + QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(0,-120), + Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); event.setAccepted(false); QGuiApplication::sendEvent(window.data(), &event); } @@ -897,7 +898,8 @@ void tst_qquickflickable::wheel() // test a horizontal flick { QPoint pos(200, 200); - QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(-120,0), -120, Qt::Horizontal, Qt::NoButton, Qt::NoModifier); + QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(-120,0), + Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); event.setAccepted(false); QGuiApplication::sendEvent(window.data(), &event); @@ -926,7 +928,8 @@ void tst_qquickflickable::trackpad() QPoint pos(200, 200); { - QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,-100), QPoint(0,-120), -120, Qt::Vertical, Qt::NoButton, Qt::NoModifier, Qt::ScrollBegin); + QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,-100), QPoint(0,-120), + Qt::NoButton, Qt::NoModifier, Qt::ScrollBegin, false); event.setAccepted(false); QGuiApplication::sendEvent(window.data(), &event); } @@ -938,7 +941,8 @@ void tst_qquickflickable::trackpad() QCOMPARE(flick->contentY(), qreal(0)); { - QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(-100,0), QPoint(-120,0), -120, Qt::Horizontal, Qt::NoButton, Qt::NoModifier, Qt::ScrollUpdate); + QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(-100,0), QPoint(-120,0), + Qt::NoButton, Qt::NoModifier, Qt::ScrollUpdate, false); event.setAccepted(false); QGuiApplication::sendEvent(window.data(), &event); } @@ -947,7 +951,8 @@ void tst_qquickflickable::trackpad() QCOMPARE(flick->contentY(), qreal(0)); { - QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,0), QPoint(0,0), 0, Qt::Horizontal, Qt::NoButton, Qt::NoModifier, Qt::ScrollEnd); + QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,0), QPoint(0,0), + Qt::NoButton, Qt::NoModifier, Qt::ScrollEnd, false); event.setAccepted(false); QGuiApplication::sendEvent(window.data(), &event); } -- cgit v1.2.3