diff options
author | David Skoland <david.skoland@qt.io> | 2020-11-03 11:27:43 +0100 |
---|---|---|
committer | David Skoland <david.skoland@qt.io> | 2020-11-06 10:16:31 +0100 |
commit | 28f7c95e3b7fe56835f70c513b192eedf093d830 (patch) | |
tree | 305e81bd44b1d140dd655ec23c940c70f7b7aebf /tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | |
parent | dfec79f5d818e3cf1390e9c149501603c36d409b (diff) |
Use built-in C++ foreach iteration in tests
Change-Id: I1e4bf9249ce26c034c676d78cfa16231226da05b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/thread/qfuture/tst_qfuture.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index 18e11c35ad..93c97a68be 100644 --- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -899,13 +899,13 @@ void tst_QFuture::multipleResults() QList<int> fasit = QList<int>() << 1 << 2 << 3 << 4; { QList<int> results; - foreach(int result, f) + for (int result : qAsConst(f)) results.append(result); QCOMPARE(results, fasit); } { QList<int> results; - foreach(int result, copy) + for (int result : qAsConst(copy)) results.append(result); QCOMPARE(results, fasit); } |