From f018af7e249359209bcc9321966d181539ddc1ba Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 17 Oct 2011 08:20:58 +0300 Subject: [PATCH] Deliver touch event timestamps in QSGCanvas. 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 --- src/declarative/items/qsgcanvas.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 879beb9..1e35627 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -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); -- 2.7.4