summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/painterpaths/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/painting/painterpaths/window.cpp')
-rw-r--r--examples/widgets/painting/painterpaths/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/painting/painterpaths/window.cpp b/examples/widgets/painting/painterpaths/window.cpp
index 95e312623e..6fb3218313 100644
--- a/examples/widgets/painting/painterpaths/window.cpp
+++ b/examples/widgets/painting/painterpaths/window.cpp
@@ -280,8 +280,8 @@ void Window::penColorChanged()
//! [22]
void Window::populateWithColors(QComboBox *comboBox)
{
- QStringList colorNames = QColor::colorNames();
- foreach (QString name, colorNames)
+ const QStringList colorNames = QColor::colorNames();
+ for (const QString &name : colorNames)
comboBox->addItem(name, QColor(name));
}
//! [22]