summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/pathstroke/main.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-07 11:58:03 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-01-23 18:48:59 +0000
commitbce32c8ab8c547d0fc9d12d192546dde361443fa (patch)
tree8a9a3a8e043bd68de8c7de242d58c207ea77e1db /examples/widgets/painting/pathstroke/main.cpp
parent770b4afeed37ddf036dcbc287b68f9f7b151af27 (diff)
Cleanup Widgets examples - foreach
Cleanup the Widgets examples - replace foreach with range-based for loop in mainwindows and painting subdirectories Change-Id: I3c1556dffd22e29dd0a5ba960e699291c496278a Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'examples/widgets/painting/pathstroke/main.cpp')
-rw-r--r--examples/widgets/painting/pathstroke/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/painting/pathstroke/main.cpp b/examples/widgets/painting/pathstroke/main.cpp
index 3a63203118..57c85d73a3 100644
--- a/examples/widgets/painting/pathstroke/main.cpp
+++ b/examples/widgets/painting/pathstroke/main.cpp
@@ -63,8 +63,8 @@ int main(int argc, char **argv)
PathStrokeWidget pathStrokeWidget(smallScreen);
QStyle *arthurStyle = new ArthurStyle();
pathStrokeWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = pathStrokeWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets) {
+ const QList<QWidget *> widgets = pathStrokeWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
}