From 3c090c80c58d99f1bd29493ef747a4f6fa915a71 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 6 Apr 2018 23:25:51 +0200 Subject: Remove String dependency from InternalClass This is required, so we can also use Symbols in the internal classes. Change-Id: I630e7aa7b8b16d5a94041f8d18515fd582f94264 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4internalclass_p.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/qml/jsruntime/qv4internalclass_p.h') diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index 04dfd4b654..a2c7620910 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -60,9 +60,6 @@ QT_BEGIN_NAMESPACE namespace QV4 { -struct String; -struct Object; -struct Identifier; struct VTable; struct MarkStack; @@ -292,15 +289,15 @@ struct InternalClass : Base { Q_REQUIRED_RESULT InternalClass *nonExtensible(); - static void addMember(QV4::Object *object, QV4::String *string, PropertyAttributes data, uint *index); - Q_REQUIRED_RESULT InternalClass *addMember(QV4::String *string, PropertyAttributes data, uint *index = nullptr); + static void addMember(QV4::Object *object, Identifier id, PropertyAttributes data, uint *index); Q_REQUIRED_RESULT InternalClass *addMember(Identifier identifier, PropertyAttributes data, uint *index = nullptr); Q_REQUIRED_RESULT InternalClass *changeMember(Identifier identifier, PropertyAttributes data, uint *index = nullptr); - static void changeMember(QV4::Object *object, QV4::String *string, PropertyAttributes data, uint *index = nullptr); + static void changeMember(QV4::Object *object, Identifier id, PropertyAttributes data, uint *index = nullptr); static void removeMember(QV4::Object *object, Identifier identifier); - uint find(const QV4::String *string); uint find(const Identifier id) { + Q_ASSERT(id.isValid()); + uint index = propertyTable.lookup(id); if (index < size) return index; -- cgit v1.2.3