summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppcompletion_test.cpp
diff options
context:
space:
mode:
authorArtem Sokolovskii <artem.sokolovskii@qt.io>2022-05-05 13:44:45 +0200
committerArtem Sokolovskii <artem.sokolovskii@qt.io>2022-05-06 13:35:43 +0000
commit7e69b64b746e38838ffed25e99bfae454b8eb100 (patch)
tree7254ee524c81a5c657dac5ad29cb26858f0c6e2a /src/plugins/cppeditor/cppcompletion_test.cpp
parent556ec7c20e6e8ff11f5ff9175a5d2c66ea951bee (diff)
downloadqt-creator-7e69b64b746e38838ffed25e99bfae454b8eb100.tar.gz
CppEditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464 Change-Id: I9915cf2c07bdcc570efc20601752d60f2ec82f34 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppcompletion_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppcompletion_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppcompletion_test.cpp b/src/plugins/cppeditor/cppcompletion_test.cpp
index 532acd6b53..683056f6b3 100644
--- a/src/plugins/cppeditor/cppcompletion_test.cpp
+++ b/src/plugins/cppeditor/cppcompletion_test.cpp
@@ -277,7 +277,7 @@ void CompletionTest::testCompletionTemplateFunction()
QStringList actualCompletions = test.getCompletions();
QString errorPattern(QLatin1String("Completion not found: %1"));
- foreach (const QString &completion, expectedCompletions) {
+ for (const QString &completion : qAsConst(expectedCompletions)) {
QByteArray errorMessage = errorPattern.arg(completion).toUtf8();
QVERIFY2(actualCompletions.contains(completion), errorMessage.data());
}
@@ -371,7 +371,7 @@ void CompletionTest::testGlobalCompletion_data()
"<REPLACEMENT>\n"
"@\n";
const QStringList replacements = QStringList({"// text", "// text.", "/// text", "/// text."});
- foreach (const QString &replacement, replacements) {
+ for (const QString &replacement : replacements) {
QByteArray code = codeTemplate;
code.replace("<REPLACEMENT>", replacement.toUtf8());
const QByteArray tag = _("completion after comment: ") + replacement.toUtf8();