diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-23 22:25:53 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-02 19:29:40 +0000 |
commit | 86f88521fbea59e8ec53e50cc1e3e68a61f53c40 (patch) | |
tree | 25f72eaf70639409d3c8a8469a05b7be0a0da03b /src/qml/jsruntime/qv4objectproto.cpp | |
parent | 8728a2b494eb384b65bd4e7c6ec785435a37de9d (diff) |
Replace Identifier by PropertyKey
Change all uses of Identifier to use the new PropertyKey class
and get rid of Identifier.
Change-Id: Ib7e83b06a3c923235e145b6e083fe980dc240452
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index 3287912c7d..81d50a01db 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -169,7 +169,7 @@ ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(const FunctionObj return QV4::Encode::undefined(); ScopedProperty desc(scope); - PropertyAttributes attrs = O->getOwnProperty(name->toIdentifier(), desc); + PropertyAttributes attrs = O->getOwnProperty(name, desc); return fromPropertyDescriptor(scope.engine, desc, attrs); } @@ -199,7 +199,7 @@ ReturnedValue ObjectPrototype::method_getOwnPropertySymbols(const FunctionObject ScopedValue n(scope); ScopedArrayObject array(scope, scope.engine->newArrayObject()); for (uint i = 0; i < ic->size; ++i) { - Identifier id = ic->nameMap.at(i); + PropertyKey id = ic->nameMap.at(i); n = id.asStringOrSymbol(); if (!n || !n->isSymbol()) continue; @@ -296,7 +296,7 @@ ReturnedValue ObjectPrototype::method_defineProperty(const FunctionObject *b, co if (scope.engine->hasException) return QV4::Encode::undefined(); - if (!O->defineOwnProperty(name->toIdentifier(), pd, attrs)) + if (!O->defineOwnProperty(name, pd, attrs)) THROW_TYPE_ERROR(); return O.asReturnedValue(); @@ -335,7 +335,7 @@ ReturnedValue ObjectPrototype::method_defineProperties(const FunctionObject *b, if (name) ok = O->defineOwnProperty(name->toPropertyKey(), n, nattrs); else - ok = O->defineOwnProperty(Identifier::fromArrayIndex(index), n, nattrs); + ok = O->defineOwnProperty(PropertyKey::fromArrayIndex(index), n, nattrs); if (!ok) THROW_TYPE_ERROR(); } @@ -584,7 +584,7 @@ ReturnedValue ObjectPrototype::method_hasOwnProperty(const FunctionObject *b, co ScopedObject O(scope, thisObject->toObject(scope.engine)); if (scope.engine->hasException) return QV4::Encode::undefined(); - bool r = O->getOwnProperty(P->toIdentifier()) != Attr_Invalid; + bool r = O->getOwnProperty(P) != Attr_Invalid; return Encode(r); } @@ -617,7 +617,7 @@ ReturnedValue ObjectPrototype::method_propertyIsEnumerable(const FunctionObject ScopedObject o(scope, thisObject->toObject(scope.engine)); if (scope.engine->hasException) return QV4::Encode::undefined(); - PropertyAttributes attrs = o->getOwnProperty(p->toIdentifier()); + PropertyAttributes attrs = o->getOwnProperty(p); return Encode(attrs.isEnumerable()); } |