aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-29 21:23:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commitd8e31c098dade7280f21ca9781ba11bee5e4f201 (patch)
tree793b7e5566e75b9c0ef45693d36cb57839a4233c /src/qml/jsruntime/qv4string.cpp
parentedee5c3dc0d922ec3b6a44d66193e9a57b8a979e (diff)
Cleanup calls to Object::setPrototype()
Rather use the correct internalClass directly when constructing the objects. Change-Id: I8e916f1ce8f83d291c08ca6332fe85b1f57b90b5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 8b78c40129..11d3100180 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -139,7 +139,7 @@ Value String::get(Managed *m, String *name, bool *hasProperty)
return Value::fromInt32(that->_text.length());
}
PropertyAttributes attrs;
- Property *pd = v4->stringPrototype->__getPropertyDescriptor__(name, &attrs);
+ Property *pd = v4->stringClass->prototype->__getPropertyDescriptor__(name, &attrs);
if (!pd || attrs.isGeneric()) {
if (hasProperty)
*hasProperty = false;
@@ -147,7 +147,7 @@ Value String::get(Managed *m, String *name, bool *hasProperty)
}
if (hasProperty)
*hasProperty = true;
- return v4->stringPrototype->getValue(Value::fromString(that), pd, attrs);
+ return v4->stringClass->prototype->getValue(Value::fromString(that), pd, attrs);
}
Value String::getIndexed(Managed *m, uint index, bool *hasProperty)
@@ -160,7 +160,7 @@ Value String::getIndexed(Managed *m, uint index, bool *hasProperty)
return Value::fromString(engine->newString(that->toQString().mid(index, 1)));
}
PropertyAttributes attrs;
- Property *pd = engine->stringPrototype->__getPropertyDescriptor__(index, &attrs);
+ Property *pd = engine->stringClass->prototype->__getPropertyDescriptor__(index, &attrs);
if (!pd || attrs.isGeneric()) {
if (hasProperty)
*hasProperty = false;
@@ -168,7 +168,7 @@ Value String::getIndexed(Managed *m, uint index, bool *hasProperty)
}
if (hasProperty)
*hasProperty = true;
- return engine->stringPrototype->getValue(Value::fromString(that), pd, attrs);
+ return engine->stringClass->prototype->getValue(Value::fromString(that), pd, attrs);
}
void String::put(Managed *m, String *name, const Value &value)