Use velocity from touch events only when they are valid
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Thu, 1 Mar 2012 11:45:29 +0000 (13:45 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 2 Mar 2012 07:26:52 +0000 (08:26 +0100)
commit82a252afdd0f920357b1e543f2ee97f92c34919b
treeac9d56f277d24e915b6d6715ec8622b1dac7d7b8
parent3c42ca87fac3326bb86a8bb816de07223b7b2e9d
Use velocity from touch events only when they are valid

Add the capability flags to the extended mouse events. Otherwise it is
not possible to tell if the velocity is valid.

While the original version is fine if velocity is guaranteed to be
available whenever QT_TRANSLATE_TOUCH_TO_MOUSE is set, some platform
and driver combinations, e.g.  the evdevtouch plugin that comes with
Qt, do not provide velocity data in touch events. The touch-only mode
of QML may be very useful in these cases too, we just need to fall
back to the built-in velocity calculation.

Change-Id: Iec5e7632a66380dc04c9435b09f5c173107bbe00
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickcanvas.cpp
src/quick/items/qquickevents_p_p.h
src/quick/items/qquickflickable.cpp