aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-07-02 10:36:35 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-04 10:12:10 +0200
commit8a80f76fd6591b0553c5e9574a5f04cd3bebb659 (patch)
treee70a366323d0b64722ab4d40fe2cd086a9d16dc2 /tests
parente10706d393937ccf2c2a33920d66617bacc0e5d7 (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.cpp7
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);
}