aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-10-08 13:54:37 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-10-10 12:44:03 +0000
commit213fdd341038d5256a017555570e3359cf111001 (patch)
treed43ad8a20360a73e6a3d90a04e697b04a8899f75 /src/plugins
parent3833e9631a03a5cffd52e198e01b094fdfead30c (diff)
QML Tooling: Don't read properties in order to count them
Reading properties may have side effects and we don't actually need the values here. Task-number: QTBUG-70989 Change-Id: If9f43f3c6a390ebd0ab1d1375fd021189adb10f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index 3dfb755936..73e9a1b219 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -154,10 +154,9 @@ const QV4::Object *collectProperty(const QV4::ScopedValue &value, QV4::Execution
int numProperties = 0;
QV4::ObjectIterator it(scope, o, QV4::ObjectIterator::EnumerableOnly);
QV4::PropertyAttributes attrs;
- QV4::ScopedProperty p(scope);
QV4::ScopedPropertyKey name(scope);
while (true) {
- name = it.next(p, &attrs);
+ name = it.next(nullptr, &attrs);
if (!name->isValid())
break;
++numProperties;