QmlJsEditor: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: I77741a639d8585d1e0ad04d7c5e6588852202e4a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Artem Sokolovskii
2022-05-17 16:11:03 +02:00
parent 840263eb9a
commit 54d4c4db62
11 changed files with 69 additions and 58 deletions

View File

@@ -59,7 +59,7 @@ namespace {
static bool isIdScope(const ObjectValue *scope, const QList<const QmlComponentChain *> &chain)
{
foreach (const QmlComponentChain *c, chain) {
for (const QmlComponentChain *c : chain) {
if (c->idScope() == scope)
return true;
if (isIdScope(scope, c->instantiatingComponents()))
@@ -391,7 +391,7 @@ protected:
void addMessages(QList<DiagnosticMessage> messages,
const Document::Ptr &doc)
{
foreach (const DiagnosticMessage &d, messages) {
for (const DiagnosticMessage &d : messages) {
int line = d.loc.startLine;
int column = qMax(1U, d.loc.startColumn);
int length = d.loc.length;
@@ -426,7 +426,7 @@ protected:
void addMessages(const QList<StaticAnalysis::Message> &messages,
const Document::Ptr &doc)
{
foreach (const StaticAnalysis::Message &d, messages) {
for (const StaticAnalysis::Message &d : messages) {
int line = d.location.startLine;
int column = qMax(1U, d.location.startColumn);
int length = d.location.length;