diff options
Diffstat (limited to 'examples/widgets/touch/fingerpaint/scribblearea.cpp')
-rw-r--r-- | examples/widgets/touch/fingerpaint/scribblearea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/touch/fingerpaint/scribblearea.cpp b/examples/widgets/touch/fingerpaint/scribblearea.cpp index aa4e60c934..0b0c4476d9 100644 --- a/examples/widgets/touch/fingerpaint/scribblearea.cpp +++ b/examples/widgets/touch/fingerpaint/scribblearea.cpp @@ -195,9 +195,9 @@ bool ScribbleArea::event(QEvent *event) case QEvent::TouchUpdate: case QEvent::TouchEnd: { - QTouchEvent *touch = static_cast<QTouchEvent *>(event); - QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints(); - foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) { + const QTouchEvent *touch = static_cast<QTouchEvent *>(event); + const QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints(); + for (const QTouchEvent::TouchPoint &touchPoint : touchPoints) { switch (touchPoint.state()) { case Qt::TouchPointStationary: case Qt::TouchPointReleased: |