summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2023-01-17 10:48:23 +0100
committerJan Arve Sæther <jan-arve.saether@qt.io>2023-01-17 16:06:08 +0100
commit0280b7eb96d82815c4f60e7300183ccb14c5d6f1 (patch)
tree34254b2441cb2077c06b7df1305112aaed4c87aa
parent8ef22183d67e0e7a8ad00bc0ea48c41510eb84ce (diff)
Painting examples: Don't mix const_iterator and non-const iterators
Reported by Clazy Pick-to: 6.5 Change-Id: I80fce912b1e5390f0056b1fa9ae0d3cfcf39d045 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp
index 87e1eb4415..a9f76084e1 100644
--- a/examples/widgets/painting/shared/hoverpoints.cpp
+++ b/examples/widgets/painting/shared/hoverpoints.cpp
@@ -163,7 +163,7 @@ bool HoverPoints::eventFilter(QObject *object, QEvent *event)
case QEventPoint::Released:
{
// move the point and release
- const auto it = m_fingerPointMapping.find(id);
+ const auto it = m_fingerPointMapping.constFind(id);
movePoint(it.value(), point.position());
m_fingerPointMapping.erase(it);
}