summaryrefslogtreecommitdiffstats
path: root/examples/opengl/legacy/overpainting/glwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/legacy/overpainting/glwidget.cpp')
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/opengl/legacy/overpainting/glwidget.cpp b/examples/opengl/legacy/overpainting/glwidget.cpp
index f98d043c5c..c4558ce785 100644
--- a/examples/opengl/legacy/overpainting/glwidget.cpp
+++ b/examples/opengl/legacy/overpainting/glwidget.cpp
@@ -130,7 +130,7 @@ void GLWidget::initializeGL()
glEnable(GL_MULTISAMPLE);
logo = new QtLogo(this);
- logo->setColor(qtGreen.dark());
+ logo->setColor(qtGreen.darker());
}
//! [2]
@@ -163,7 +163,7 @@ void GLWidget::paintEvent(QPaintEvent *event)
//! [4]
//! [6]
- qglClearColor(qtPurple.dark());
+ qglClearColor(qtPurple.darker());
glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
@@ -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]