diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-23 23:07:23 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-02 19:29:43 +0000 |
commit | 56bff8f7abc2f0eeadd4d197667132af6eed6f3a (patch) | |
tree | 13990d34f9239e1845dedaa452bc1093f38b027a /src/qml/jsruntime/qv4dateobject.cpp | |
parent | 86f88521fbea59e8ec53e50cc1e3e68a61f53c40 (diff) |
Clean up the property key API in StringOrSymbol
Get rid of makeIdentifier(), as toPropertyKey() will take
care of it.
Rename identifier() to propertyKey() and check that the
key is valid.
Remove String/StringOrSymbol::asArrayIndex(), we don't need it
anymore.
Change-Id: I3c490fabc1475c9ea288b49b1638b6fa1bc237b7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp index 5b81d91879..12649c0860 100644 --- a/src/qml/jsruntime/qv4dateobject.cpp +++ b/src/qml/jsruntime/qv4dateobject.cpp @@ -1524,10 +1524,10 @@ ReturnedValue DatePrototype::method_symbolToPrimitive(const FunctionObject *f, c return e->throwTypeError(); String *hint = argv->stringValue(); - PropertyKey id = hint->identifier(); - if (id == e->id_default()->identifier()) + PropertyKey id = hint->toPropertyKey(); + if (id == e->id_default()->propertyKey()) hint = e->id_string(); - else if (id != e->id_string()->identifier() && id != e->id_number()->identifier()) + else if (id != e->id_string()->propertyKey() && id != e->id_number()->propertyKey()) return e->throwTypeError(); return RuntimeHelpers::ordinaryToPrimitive(e, static_cast<const Object *>(thisObject), hint); |