summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/orderform
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-07 12:01:42 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-01-23 18:49:05 +0000
commit34e4a8ef6d20e829a322bfef1d09136a37fecfd2 (patch)
treef4bfd10d8a155f14a7f88f881bb2768fc87abadc /examples/widgets/richtext/orderform
parent26f7edb09eaf66590de9a3603489464fd868eedc (diff)
Cleanup Widgets examples - foreach
Cleanup the Widgets examples - replace foreach with range-based for loop in the remaining directories Change-Id: I321e6c0f414401a1ae4fb65762b97d894b725afa Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Diffstat (limited to 'examples/widgets/richtext/orderform')
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index 291c37edf6..0b6a2cac6c 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -126,8 +126,8 @@ void MainWindow::createLetter(const QString &name, const QString &address,
cursor.setPosition(topFrame->lastPosition());
cursor.insertText(name, textFormat);
- QString line;
- foreach (line, address.split("\n")) {
+ const QStringList lines = address.split('\n');
+ for (const QString &line : lines) {
cursor.insertBlock();
cursor.insertText(line);
}