aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-06 23:25:51 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:23 +0000
commit3c090c80c58d99f1bd29493ef747a4f6fa915a71 (patch)
tree6c9f9c4dd23e57901b0dc30d66a467a1b7893688 /src/qml/jsruntime/qv4internalclass_p.h
parent0660714ace53ddecfb0f9d5e238799fea5bbdb67 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h11
1 files changed, 4 insertions, 7 deletions
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;