aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSeokha Ko <seokha.ko@qt.io>2022-08-24 14:09:53 +0900
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-26 10:52:08 +0000
commit4049293182743a2eccc0b602829ddd200899318b (patch)
tree90a4326d6c2fc9747395e968d875da923b93d07f /src
parent15f451e99a2d3ca3c2fc4b8f8464b949b9dc7549 (diff)
Use the time stamp of the touch event when deliver touch as mouse
Use the time stamp of the touch event when converting a touch event to a mouse event for items that do not handle touch events Fixes: QTBUG-105907 Change-Id: I642093346459a031b77174eeecba8470e103e8dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3c3aef14865fe8a9865403feb044771a27522256) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/util/qquickdeliveryagent.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index c339bccf21..0de696c837 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -82,6 +82,7 @@ void QQuickDeliveryAgentPrivate::touchToMouseEvent(QEvent::Type type, const QEve
(type == QEvent::MouseButtonRelease ? Qt::NoButton : Qt::LeftButton),
touchEvent->modifiers(), Qt::MouseEventSynthesizedByQt);
ret.setAccepted(true); // this now causes the persistent touchpoint to be accepted too
+ ret.setTimestamp(touchEvent->timestamp());
*mouseEvent = ret;
}