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:
@@ -129,20 +129,20 @@ void QuickToolBar::apply(TextEditor::TextEditorWidget *editorWidget, Document::P
|
||||
|
||||
if (scopeChain && scopeObject) {
|
||||
m_prototypes.clear();
|
||||
foreach (const ObjectValue *object,
|
||||
PrototypeIterator(scopeObject, scopeChain->context()).all()) {
|
||||
const QList<const ObjectValue *> objects
|
||||
= PrototypeIterator(scopeObject, scopeChain->context()).all();
|
||||
for (const ObjectValue *object : objects)
|
||||
m_prototypes.append(object->className());
|
||||
}
|
||||
|
||||
if (m_prototypes.contains(QLatin1String("PropertyChanges"))) {
|
||||
isPropertyChanges = true;
|
||||
const ObjectValue *targetObject = getPropertyChangesTarget(node, *scopeChain);
|
||||
m_prototypes.clear();
|
||||
if (targetObject) {
|
||||
foreach (const ObjectValue *object,
|
||||
PrototypeIterator(targetObject, scopeChain->context()).all()) {
|
||||
const QList<const ObjectValue *> objects
|
||||
= PrototypeIterator(targetObject, scopeChain->context()).all();
|
||||
for (const ObjectValue *object : objects)
|
||||
m_prototypes.append(object->className());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user