From d0bcbbebc3db44afbc2222566213cb1c9b2fe525 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 7 Jan 2022 08:27:04 +0100 Subject: [PATCH] QGuiApplication: remove an unneeded const_cast QPointingDevicePrivate::pointById() already returns (mutable) EventPointData*, so the eventPoint member is mutable, too. Task-number: QTBUG-99615 Pick-to: 6.3 6.2 Change-Id: Iae1e665cab4b83b63e0e693bf7c4689e99aa3bae Reviewed-by: Volker Hilsheimer --- 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 8af4a7110a..de1b8d725f 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2851,7 +2851,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To for (auto &tempPt : e->points) { // update state auto epd = devPriv->pointById(tempPt.id()); - auto &mut = QMutableEventPoint::from(const_cast(epd->eventPoint)); + auto &mut = QMutableEventPoint::from(epd->eventPoint); epd->eventPoint.setAccepted(false); switch (tempPt.state()) { case QEventPoint::State::Pressed: