summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-01-07 12:49:05 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-13 14:17:49 +0000
commit2705b5258d2270ea24b0f526959ac167214e242e (patch)
tree33da4ae409589ea6f214eabd5768699e703ca89a /src/gui/kernel
parenta4e2045372d9d069f601ce930a8787807eb67b3f (diff)
QWindowSystemInterface: port to QMutableEventPoint static setter API
This code was actually ok (no UB), but it's in the way of making QMutableEventPoint a befriendable namespace, so port from using QMutableEventPoint to QEventPoint instances + QMutableEventPoint static setters. Task-number: QTBUG-99615 Change-Id: I1f123837d62a2200e36faf89f6912ee59be2f915 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 5beb842b98cc7e18f82cf3237e96085f6808a9b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 001c5206d0..d4e7c5553a 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -681,14 +681,14 @@ QList<QEventPoint>
QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd();
while (point != end) {
QPointF globalPos = QHighDpi::fromNativePixels(point->area.center(), window);
- QMutableEventPoint p(point->id, point->state, globalPos, globalPos);
+ QEventPoint p(point->id, point->state, globalPos, globalPos);
states |= point->state;
if (point->uniqueId >= 0)
- p.setUniqueId(QPointingDeviceUniqueId::fromNumericId(point->uniqueId));
- p.setPressure(point->pressure);
- p.setRotation(point->rotation);
- p.setEllipseDiameters(QHighDpi::fromNativePixels(point->area.size(), window));
- p.setVelocity(QHighDpi::fromNativePixels(point->velocity, window));
+ QMutableEventPoint::setUniqueId(p, QPointingDeviceUniqueId::fromNumericId(point->uniqueId));
+ QMutableEventPoint::setPressure(p, point->pressure);
+ QMutableEventPoint::setRotation(p, point->rotation);
+ QMutableEventPoint::setEllipseDiameters(p, QHighDpi::fromNativePixels(point->area.size(), window));
+ QMutableEventPoint::setVelocity(p, QHighDpi::fromNativePixels(point->velocity, window));
// The local pos is not set: it will be calculated
// when the event gets processed by QGuiApplication.