diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-07-02 10:36:35 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-04 10:12:10 +0200 |
commit | 8a80f76fd6591b0553c5e9574a5f04cd3bebb659 (patch) | |
tree | e70a366323d0b64722ab4d40fe2cd086a9d16dc2 /tests | |
parent | e10706d393937ccf2c2a33920d66617bacc0e5d7 (diff) |
Improve wheel event handling.
Use new angleDelta() rather than deprecated event data.
Change-Id: I28d0a1ff1bc99b35e1ce3d553e5cb9bdc9362f4c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |