summaryrefslogtreecommitdiff
path: root/examples/quickcontrols/controls/texteditor/src/documenthandler.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-10 21:21:17 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-15 14:21:25 +0200
commit874f8ef3b9fb9d80a2b05c264ca48464e31257e2 (patch)
tree2a1213104b290a196e71f57e928befc38a20c992 /examples/quickcontrols/controls/texteditor/src/documenthandler.cpp
parent0a8d24180e11a093656a8efe31370a591115a96f (diff)
downloadqtquickcontrols-874f8ef3b9fb9d80a2b05c264ca48464e31257e2.tar.gz
Eradicate Java-style iterators and Q_FOREACH and mark the module free of them
... and QLinkedList. Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Ditto Q_FOREACH. Ditto QLinkedList. Change-Id: I92eb5c22762b63cba45f8eaf717c1b7d458fcda4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols/controls/texteditor/src/documenthandler.cpp')
-rw-r--r--examples/quickcontrols/controls/texteditor/src/documenthandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/quickcontrols/controls/texteditor/src/documenthandler.cpp b/examples/quickcontrols/controls/texteditor/src/documenthandler.cpp
index 69da88f0..ac9f5bd4 100644
--- a/examples/quickcontrols/controls/texteditor/src/documenthandler.cpp
+++ b/examples/quickcontrols/controls/texteditor/src/documenthandler.cpp
@@ -345,7 +345,8 @@ QStringList DocumentHandler::defaultFontSizes() const
// uhm... this is quite ugly
QStringList sizes;
QFontDatabase db;
- foreach (int size, db.standardSizes())
+ const auto standardSizes = db.standardSizes();
+ for (int size : standardSizes)
sizes.append(QString::number(size));
return sizes;
}