aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-03-01 08:39:37 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-03-01 10:54:35 +0000
commit2b55b531b095a991376a26599d503223a67ae946 (patch)
treead44a0221ffc1bcf92358f5fe6e5032f0ec38cb3
parent384b6f76242d1872feb1c7483f0526ecc9dd3c2e (diff)
Flickable: handle wheel NoScrollPhase the same as ScrollUpdate
Before change f253f4c in qtbase, when an ordinary mouse wheel is rotated the phase would be ScrollUpdate continuously, without going through the other phases; whereas on a gesture-interpreting trackpad there would be a ScrollBegin first. Now, an ordinary wheel mouse uses NoScrollPhase continuously, which makes it easier to tell the two cases apart. But we're required to handle the new phase explicitly. To avoid change in existing behavior, we handle it the same as ScrollUpdate phase was handled before. Change-Id: I2d51a89a965704cf843303d523463805b4fe6ff8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--src/quick/items/qquickflickable.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index b568db1d26..26c4e66dd4 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1390,6 +1390,7 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
d->timer.start();
d->maybeBeginDrag(currentTimestamp, event->posF());
break;
+ case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse
case Qt::ScrollUpdate:
if (d->scrollingPhase) {
d->pressed = true;