aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump/qmltypereader.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2016-02-01 16:10:35 +0100
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-02-02 14:57:25 +0000
commit1929fee8e17e9ca66e7fe08faa9ed9fa7fdbb127 (patch)
treefdb68eb626a71bd0ab07a5f2a02b76b3cf34c3e0 /tools/qmlplugindump/qmltypereader.cpp
parent666bc731a0ba930ca0cfda18daf836913fd91361 (diff)
Flickable: ensure movementEnded after wheel/trackpad flick
In qtdeclarative/tests/manual/touch/flicktext.qml it was already clear that the moving/movingVertically/Horizontally properties did not revert to false after a trackpad flick on OS X. It turns out that the failure to emit the movementEnded signal also caused a scrolling bug in ListView. QQuickFlickable::wheelEvent() looks at event->phase(), but ScrollEnd is not absolute: on OS X with a bluetooth trackpad, it happens once when the user's fingers are lifted, then the "momentum" events occur with ScrollUpdate, and then ScrollEnd happens again at the end of the momentum phase. But if the user's fingers come to rest before being lifted, to stop the momentum, then the ScrollEnd phase happens only once, and that's actually the end of scrolling, flicking and movement, all at once. The events don't seem to provide enough information to disambiguate these two cases; but if ScrollEnd phase occurs, and then we don't receive any more events within some short time interval, we can be pretty sure the scrolling really ended. So, use a timer to check whether any more events have been received, a little later after the ScrollEnd phase. The movementEnded signal can now be emitted for several reasons: the regular timeline ended movement, the velocityTimeline ended movement, or the movementEndingTimer sent an event. Also, when flicking with a physical mouse wheel, flickStarted was emitted multiple times; now it will be emitted only once. Task-number: QTBUG-47151 Change-Id: I534e99befbd9bf6af24c4ebdca73dd21964f1063 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tools/qmlplugindump/qmltypereader.cpp')
0 files changed, 0 insertions, 0 deletions