From 8a80f76fd6591b0553c5e9574a5f04cd3bebb659 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 2 Jul 2012 10:36:35 +1000 Subject: Improve wheel event handling. Use new angleDelta() rather than deprecated event data. Change-Id: I28d0a1ff1bc99b35e1ce3d553e5cb9bdc9362f4c Reviewed-by: Martin Jones --- tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index dc895dc423..54f7d5210f 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -489,7 +489,8 @@ void tst_qquickflickable::wheel() QVERIFY(flick != 0); { - QWheelEvent event(QPoint(200, 200), -120, Qt::NoButton, Qt::NoModifier, Qt::Vertical); + QPoint pos(200, 200); + QWheelEvent event(pos, canvas->mapToGlobal(pos), QPoint(), QPoint(0,-120), -120, Qt::Vertical, Qt::NoButton, Qt::NoModifier); event.setAccepted(false); QGuiApplication::sendEvent(canvas, &event); } @@ -501,7 +502,9 @@ void tst_qquickflickable::wheel() QVERIFY(flick->contentY() == 0); { - QWheelEvent event(QPoint(200, 200), -120, Qt::NoButton, Qt::NoModifier, Qt::Horizontal); + QPoint pos(200, 200); + QWheelEvent event(pos, canvas->mapToGlobal(pos), QPoint(), QPoint(-120,0), -120, Qt::Horizontal, Qt::NoButton, Qt::NoModifier); + event.setAccepted(false); QGuiApplication::sendEvent(canvas, &event); } -- cgit v1.2.3