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>
This commit is contained in:
Jan Arve Sæther 2023-01-17 10:48:23 +01:00
parent 8ef22183d6
commit 0280b7eb96

View File

@ -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);
}