From d2055fcee5a7f2ee83bd7b67da8b0b325f9504c4 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 5 Jan 2022 22:17:11 +0100 Subject: [PATCH] QGuiApplication: remove a use of QMutableEventPoint The 'persistentPoint' reference is never used as a QMutableEventPoint, so don't cast to it (which is UB). Pick-to: 6.3 6.2 Task-number: QTBUG-99615 Change-Id: I7fdfb2427a09d691242bf1fa28e202ba326ea678 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qguiapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index c9fbc301af..8af4a7110a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2172,7 +2172,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo QPointF localPoint = e->localPos; bool doubleClick = false; auto persistentEPD = devPriv->pointById(0); - const auto &persistentPoint = QMutableEventPoint::from(persistentEPD->eventPoint); + const auto &persistentPoint = persistentEPD->eventPoint; if (mouseMove) { QGuiApplicationPrivate::lastCursorPosition = globalPoint;