Deliver touch event timestamps in QSGCanvas.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Mon, 17 Oct 2011 05:20:58 +0000 (08:20 +0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 18 Oct 2011 07:17:26 +0000 (09:17 +0200)
The timestamp in input events is new in Qt5. When making copies of a
touch event this field must be copied too otherwise the event received
by the items will contain a default timestamp of 0.

Change-Id: I87dd337c964f34a6da6db808d83b7311df64fcd5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/items/qsgcanvas.cpp

index 879beb9..1e35627 100644 (file)
@@ -1348,6 +1348,7 @@ bool QSGCanvasPrivate::deliverTouchPoints(QSGItem *item, QTouchEvent *event, con
             touchEvent.setModifiers(event->modifiers());
             touchEvent.setTouchPointStates(eventStates);
             touchEvent.setTouchPoints(eventPoints);
+            touchEvent.setTimestamp(event->timestamp());
 
             touchEvent.accept();
             q->sendEvent(item, &touchEvent);