diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-07 12:41:33 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-08 11:36:14 (GMT) |
commit | 8050a8ea1b30b0d35fc20e9d09ff48c242a924cd (patch) | |
tree | e2f4e8c503cb751f5b5104f0559429c973f4c341 /tests/auto/qabstractslider | |
parent | 9e59f3e021e78a5b825b7673248e0bf37ac935f1 (diff) | |
download | Qt-8050a8ea1b30b0d35fc20e9d09ff48c242a924cd.zip Qt-8050a8ea1b30b0d35fc20e9d09ff48c242a924cd.tar.gz Qt-8050a8ea1b30b0d35fc20e9d09ff48c242a924cd.tar.bz2 |
Mac: fix auto test to reflect recent changes in wheel event handling
...on mac. Since mouse wheel events are accelerated by the OS on mac,
we cannot multiply the delta with QApplication::wheelScrollLines,
since this will make scrolling behave far to fast. To change the
speed of wheel events on Mac, one should use system preferences.
This patch updates the test to reflect his difference.
Rev-By: ogoffart
Diffstat (limited to 'tests/auto/qabstractslider')
-rw-r--r-- | tests/auto/qabstractslider/tst_qabstractslider.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp index 9f7a78e..5c70bde 100644 --- a/tests/auto/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp @@ -714,7 +714,11 @@ void tst_QAbstractSlider::wheelEvent_data() << 1 // delta << int(Qt::Vertical) // orientation of slider << int(Qt::Vertical) // orientation of wheel +#ifdef Q_WS_MAC + << 1 // expected position after +#else << 20 // expected position after +#endif << QPoint(0,0); QTest::newRow("Normal data page") << 0 // initial position @@ -773,7 +777,11 @@ void tst_QAbstractSlider::wheelEvent_data() << 1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel +#ifdef Q_WS_MAC + << 49 // expected position after +#else << 30 // expected position after +#endif << QPoint(1,1); QTest::newRow("Past end") << 50 // initial position @@ -784,7 +792,11 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers +#ifdef Q_WS_MAC + << 60 // delta +#else << 2 // delta +#endif << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 100 // expected position after @@ -798,7 +810,11 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers - << -2 // delta +#ifdef Q_WS_MAC + << -60 // delta +#else + << -2 // delta +#endif << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 0 // expected position after |