diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-09-19 15:36:48 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-09-25 09:29:53 +0000 |
commit | 33d5e53f865d0950dc390afbe4ded442289c3090 (patch) | |
tree | be2b88e32e01c9481d3b309483efba6322589dd3 /tests/auto/parser | |
parent | b83922861ce7214eb5a2b192ab040c3cc8a42a96 (diff) |
Replace Q_FOREACH/foreach with ranged-for
Change-Id: I7b4d13a49577a7d984727722ff2ae4458eab2d6e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/parser')
-rw-r--r-- | tests/auto/parser/tst_parser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/parser/tst_parser.cpp b/tests/auto/parser/tst_parser.cpp index 41927cf..0a0c287 100644 --- a/tests/auto/parser/tst_parser.cpp +++ b/tests/auto/parser/tst_parser.cpp @@ -49,7 +49,8 @@ void tst_Parser::error_data() QTest::addColumn<QString>("errorFileName"); QDir dir(QLatin1String(":/tst_parser/data/")); - foreach (const QString &entry, dir.entryList()) { + const auto dirEntries = dir.entryList(); + for (const QString &entry : dirEntries) { if (!entry.endsWith(QLatin1String(".errors"))) { QString scxmlFileName = dir.filePath(entry); QTest::newRow(entry.toLatin1().constData()) @@ -73,7 +74,7 @@ void tst_Parser::error() const QVector<QScxmlError> errors = stateMachine->parseErrors(); if (errors.count() != expectedErrors.count()) { - foreach (const QScxmlError &error, errors) { + for (const QScxmlError &error : errors) { qDebug() << error.toString(); } } |