forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user