diff options
| author | Alexander Lohnau <[email protected]> | 2020-10-23 19:48:22 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-10-23 18:23:06 +0000 |
| commit | a24327cd50ef17b953ecb908d260b73460158107 (patch) | |
| tree | b0fdaf2b2ab6cc4df0d471b3f1e9f449be71aa33 /src/tests/kfileitemmodelbenchmark.cpp | |
| parent | 360a8dd883f7e281c0a3f2ae729450790399bf3d (diff) | |
Compile without foreach
Diffstat (limited to 'src/tests/kfileitemmodelbenchmark.cpp')
| -rw-r--r-- | src/tests/kfileitemmodelbenchmark.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp index 75f81678d..37874cea8 100644 --- a/src/tests/kfileitemmodelbenchmark.cpp +++ b/src/tests/kfileitemmodelbenchmark.cpp @@ -67,7 +67,7 @@ void KFileItemModelBenchmark::insertAndRemoveManyItems_data() QList<int> sizes; sizes << 100000; - foreach (int n, sizes) { + for (int n : qAsConst(sizes)) { QStringList allStrings; for (int i = 0; i < n; ++i) { allStrings << QString::number(i); @@ -197,7 +197,7 @@ KFileItemList KFileItemModelBenchmark::createFileItemList(const QStringList& fil qInstallMessageHandler(myMessageOutput); KFileItemList result; - foreach (const QString& name, fileNames) { + for (const QString& name : fileNames) { const KFileItem item(QUrl::fromLocalFile(prefix + name), QString(), KFileItem::Unknown); result << item; } |
