From db695c5b1d07275f208446dad178b1131b20bb0a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 22 Jun 2018 22:59:43 +0200 Subject: Unify the get and getIndexed vtable functions of QV4::Object This finalizes the refactoring of Object's vtable API. Also added the receiver argument to the method as required by the ES7 spec. Change-Id: I36f9989211c47458788fe9f7e929862bcfe7b845 Reviewed-by: Simon Hausmann --- src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 4 ++-- .../qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp index ff74cf8981..a437b7ccc7 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp @@ -400,7 +400,7 @@ QV4DataCollector::Ref QV4DataCollector::addRef(QV4::Value value, bool deduplicat QV4::ScopedObject array(scope, m_values.value()); if (deduplicate) { for (Ref i = 0; i < array->getLength(); ++i) { - if (array->getIndexed(i) == value.rawValue() && !m_specialRefs.contains(i)) + if (array->get(i) == value.rawValue() && !m_specialRefs.contains(i)) return i; } } @@ -415,7 +415,7 @@ QV4::ReturnedValue QV4DataCollector::getValue(Ref ref) QV4::Scope scope(engine()); QV4::ScopedObject array(scope, m_values.value()); Q_ASSERT(ref < array->getLength()); - return array->getIndexed(ref, nullptr); + return array->get(ref, nullptr); } // TODO: Drop this method once we don't need to support namesAsObjects anymore diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 36390a3ea5..b98cfffb6e 100644 --- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp @@ -415,7 +415,7 @@ void Collector::collect(QJsonArray *out, const QString &parentIName, const QStri if (isExpanded(iname)) { QJsonArray children; for (uint i = 0; i < n; ++i) { - QV4::ReturnedValue v = array->getIndexed(i); + QV4::ReturnedValue v = array->get(i); QV4::ScopedValue sval(scope, v); collect(&children, iname, QString::number(i), *sval); } -- cgit v1.2.3