Commit 56d3b2dd authored by Marco Martin's avatar Marco Martin Committed by Vlad Zahorodnii
Browse files

Set all timestamps for all touch events

in order for qml pointerhandlers to work correctly, they need
timestamps in all events (to decide for instance when to emit a
tapped or doubletapped)

BUG:456133
parent 5975cd95
Pipeline #197936 passed with stage
in 13 minutes and 30 seconds
......@@ -384,8 +384,6 @@ bool OffscreenQuickView::forwardTouchDown(qint32 id, const QPointF &pos, quint32
bool OffscreenQuickView::forwardTouchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
d->updateTouchState(Qt::TouchPointMoved, id, pos);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
......@@ -393,6 +391,7 @@ bool OffscreenQuickView::forwardTouchMotion(qint32 id, const QPointF &pos, quint
#else
QTouchEvent event(QEvent::TouchUpdate, d->touchDevice, Qt::NoModifier, d->touchPoints);
#endif
event.setTimestamp(time);
QCoreApplication::sendEvent(d->m_view, &event);
return event.isAccepted();
......@@ -400,8 +399,6 @@ bool OffscreenQuickView::forwardTouchMotion(qint32 id, const QPointF &pos, quint
bool OffscreenQuickView::forwardTouchUp(qint32 id, quint32 time)
{
Q_UNUSED(time)
d->updateTouchState(Qt::TouchPointReleased, id, QPointF{});
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
......@@ -409,6 +406,7 @@ bool OffscreenQuickView::forwardTouchUp(qint32 id, quint32 time)
#else
QTouchEvent event(QEvent::TouchEnd, d->touchDevice, Qt::NoModifier, d->touchPoints);
#endif
event.setTimestamp(time);
QCoreApplication::sendEvent(d->m_view, &event);
return event.isAccepted();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment