aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/collidingmice/mouse.cpp4
1 files changed, 2 insertions, 2 deletions
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<QGraphicsItem *> dangerMice = scene()->items(QPolygonF()
+ const QList<QGraphicsItem *> 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;