diff options
Diffstat (limited to 'examples/opengl/legacy/overpainting/glwidget.cpp')
-rw-r--r-- | examples/opengl/legacy/overpainting/glwidget.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/opengl/legacy/overpainting/glwidget.cpp b/examples/opengl/legacy/overpainting/glwidget.cpp index f98d043c5c..0094f8ead7 100644 --- a/examples/opengl/legacy/overpainting/glwidget.cpp +++ b/examples/opengl/legacy/overpainting/glwidget.cpp @@ -247,12 +247,8 @@ void GLWidget::createBubbles(int number) //! [13] void GLWidget::animate() { - QMutableListIterator<Bubble*> iter(bubbles); - - while (iter.hasNext()) { - Bubble *bubble = iter.next(); + for (Bubble *bubble : qAsConst(bubbles)) bubble->move(rect()); - } update(); } //! [13] |