aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsscopebuilder.cpp
diff options
context:
space:
mode:
authorArtem Sokolovskii <[email protected]>2022-12-19 16:41:00 +0100
committerArtem Sokolovskii <[email protected]>2022-12-21 12:53:41 +0000
commitf0556b08b825ef92a3549f0581a441678a090fa1 (patch)
tree70bf4963ffb24b20317d5838aaa1eb8f3f8d37ce /src/libs/qmljs/qmljsscopebuilder.cpp
parent50ebf1f82423e5586f8a850c8eccd6d5610a0789 (diff)
qmljs: Remove foreach usage
Task-number: QTCREATORBUG-27464 Change-Id: Ifdb8cf514dfe328e0a64bde1beff3e63a4b7fbc3 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp')
-rw-r--r--src/libs/qmljs/qmljsscopebuilder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp
index a2852c4c60d..2e82b8fbd6a 100644
--- a/src/libs/qmljs/qmljsscopebuilder.cpp
+++ b/src/libs/qmljs/qmljsscopebuilder.cpp
@@ -48,7 +48,7 @@ void ScopeBuilder::push(AST::Node *node)
const ObjectValue *owner = nullptr;
const Value *value = nullptr;
// try to find the name on the scope objects
- foreach (const ObjectValue *scope, _scopeChain->qmlScopeObjects()) {
+ for (const ObjectValue *scope : _scopeChain->qmlScopeObjects()) {
value = scope->lookupMember(name, _scopeChain->context(), &owner);
if (value)
break;
@@ -84,7 +84,7 @@ void ScopeBuilder::push(AST::Node *node)
void ScopeBuilder::push(const QList<AST::Node *> &nodes)
{
- foreach (Node *node, nodes)
+ for (Node *node : nodes)
push(node);
}
@@ -196,7 +196,7 @@ const Value *ScopeBuilder::scopeObjectLookup(AST::UiQualifiedId *id)
{
// do a name lookup on the scope objects
const Value *result = nullptr;
- foreach (const ObjectValue *scopeObject, _scopeChain->qmlScopeObjects()) {
+ for (const ObjectValue *scopeObject : _scopeChain->qmlScopeObjects()) {
const ObjectValue *object = scopeObject;
for (UiQualifiedId *it = id; it; it = it->next) {
if (it->name.isEmpty())