Debugger: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: Ib49afb4d0283aeeffead6b31e1a3d0bcb9a7ae14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Artem Sokolovskii
2022-04-29 12:43:37 +02:00
parent fbefd45b94
commit 27fddc8dc7
10 changed files with 54 additions and 40 deletions

View File

@@ -649,7 +649,8 @@ void QmlInspectorAgent::addWatchData(const ObjectReference &obj,
propertiesWatch->value = "list";
propertiesWatch->wantsChildren = true;
foreach (const PropertyReference &property, obj.properties()) {
const QList<PropertyReference> properties = obj.properties();
for (const PropertyReference &property : properties) {
const QString propertyName = property.name();
if (propertyName.isEmpty())
continue;
@@ -669,7 +670,8 @@ void QmlInspectorAgent::addWatchData(const ObjectReference &obj,
}
// recurse
foreach (const ObjectReference &child, obj.children())
const QList<ObjectReference> children = obj.children();
for (const ObjectReference &child : children)
addWatchData(child, objIname, append);
}