From 9757970c477fbd5c81a603b0a5d2106e6db7ca34 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Sun, 19 Nov 2017 13:43:58 +0300 Subject: Replace 'foreach' macro with range-based 'for' Change-Id: I34479bc9673d0202363aeba5c7919efc8f0d7287 Reviewed-by: Christian Kandeler --- examples/collidingmice/mouse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/collidingmice/mouse.cpp b/examples/collidingmice/mouse.cpp index c3373501c..8dbe28c49 100644 --- a/examples/collidingmice/mouse.cpp +++ b/examples/collidingmice/mouse.cpp @@ -162,11 +162,11 @@ void Mouse::advance(int step) // Try not to crash with any other mice //! [7] - QList dangerMice = scene()->items(QPolygonF() + const QList dangerMice = scene()->items(QPolygonF() << mapToScene(0, 0) << mapToScene(-30, -50) << mapToScene(30, -50)); - foreach (QGraphicsItem *item, dangerMice) { + for (QGraphicsItem *item : dangerMice) { if (item == this) continue; -- cgit v1.2.3