aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-23 20:08:40 +0200
committerLars Knoll <lars.knoll@qt.io>2018-07-02 19:29:32 +0000
commit56602df447c5f16257874f2e97b078dcf76f2467 (patch)
tree901c76eb6262dad80e6ab94af810c645355cb6d5 /src/qml/jsruntime/qv4qobjectwrapper.cpp
parentdb695c5b1d07275f208446dad178b1131b20bb0a (diff)
Cleanups in the Identifier API
Rename from/asHeapObject to from/asStringOrSymbol and fix the signature. Add a isStringOrSymbol() method and redefine isValid() to also include array indices. Change-Id: Ic8272bfbe84d15421e2ebe86ddda7fdaa8db4f3e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index cd8563d06a..3fd5564847 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -700,7 +700,7 @@ QV4::ReturnedValue QObjectWrapper::get(const Managed *m, Identifier id, const Va
const QObjectWrapper *that = static_cast<const QObjectWrapper*>(m);
Scope scope(that);
- ScopedString n(scope, id.asHeapObject());
+ ScopedString n(scope, id.asStringOrSymbol());
QQmlContextData *qmlContext = that->engine()->callingQmlContext();
return that->getQmlProperty(qmlContext, n, IgnoreRevision, hasProperty, /*includeImports*/ true);
}
@@ -712,7 +712,7 @@ bool QObjectWrapper::put(Managed *m, Identifier id, const Value &value, Value *r
Scope scope(m);
QObjectWrapper *that = static_cast<QObjectWrapper*>(m);
- ScopedString name(scope, id.asHeapObject());
+ ScopedString name(scope, id.asStringOrSymbol());
if (scope.engine->hasException || QQmlData::wasDeleted(that->d()->object()))
return false;
@@ -742,7 +742,7 @@ PropertyAttributes QObjectWrapper::getOwnProperty(Managed *m, Identifier id, Pro
const QObject *thatObject = that->d()->object();
if (!QQmlData::wasDeleted(thatObject)) {
Scope scope(m);
- ScopedString n(scope, id.asHeapObject());
+ ScopedString n(scope, id.asStringOrSymbol());
QQmlContextData *qmlContext = scope.engine->callingQmlContext();
QQmlPropertyData local;
if (that->findProperty(scope.engine, qmlContext, n, IgnoreRevision, &local)