diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 11 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa.cpp | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index e2a7b27430..07d2632b52 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -5215,7 +5215,8 @@ int QApplicationPrivate::findClosestTouchPointId(const QPointF &screenPos) void QApplicationPrivate::translateRawTouchEvent(QWidget *window, QTouchEvent::DeviceType deviceType, - const QList<QTouchEvent::TouchPoint> &touchPoints) + const QList<QTouchEvent::TouchPoint> &touchPoints, + ulong timestamp) { QApplicationPrivate *d = self; typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints; @@ -5352,6 +5353,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, it.value().first, it.value().second); updateTouchPointsForWidget(widget, &touchEvent); + touchEvent.setTimestamp(timestamp); switch (touchEvent.type()) { case QEvent::TouchBegin: @@ -5374,10 +5376,11 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, } Q_WIDGETS_EXPORT void qt_translateRawTouchEvent(QWidget *window, - QTouchEvent::DeviceType deviceType, - const QList<QTouchEvent::TouchPoint> &touchPoints) + QTouchEvent::DeviceType deviceType, + const QList<QTouchEvent::TouchPoint> &touchPoints, + ulong timestamp) { - QApplicationPrivate::translateRawTouchEvent(window, deviceType, touchPoints); + QApplicationPrivate::translateRawTouchEvent(window, deviceType, touchPoints, timestamp); } #ifndef QT_NO_GESTURES diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 092eaa35a4..77a02bd5ab 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -499,7 +499,8 @@ public: void removeTouchPoint(int touchPointId); static void translateRawTouchEvent(QWidget *widget, QTouchEvent::DeviceType deviceType, - const QList<QTouchEvent::TouchPoint> &touchPoints); + const QList<QTouchEvent::TouchPoint> &touchPoints, + ulong timestamp); #if defined(Q_WS_WIN) static bool HasTouchSupport; diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index 32a446fa54..7d8b57f233 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -289,7 +289,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) void QWidgetWindow::handleTouchEvent(QTouchEvent *event) { - QApplicationPrivate::translateRawTouchEvent(m_widget, event->deviceType(), event->touchPoints()); + QApplicationPrivate::translateRawTouchEvent(m_widget, event->deviceType(), event->touchPoints(), event->timestamp()); } void QWidgetWindow::handleKeyEvent(QKeyEvent *event) |