diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-22 22:59:43 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-02 19:29:29 +0000 |
commit | db695c5b1d07275f208446dad178b1131b20bb0a (patch) | |
tree | c2175a065f4918d31249ca1ce46a2811733b8093 /src/plugins | |
parent | 98263a01373f5b225d64da216537165ae27d7ff1 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
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); } |