aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.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/qv4stringobject.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/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 6fd312ab24..442297ffe0 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -88,7 +88,7 @@ StringObject::StringObject(InternalClass *ic)
}
StringObject::StringObject(ExecutionEngine *engine, const Value &value)
- : Object(engine), value(value)
+ : Object(engine->stringClass), value(value)
{
vtbl = &static_vtbl;
type = Type_StringObject;
@@ -364,7 +364,7 @@ Value StringPrototype::method_match(SimpleCallContext *context)
bool global = rx->global;
// ### use the standard builtin function, not the one that might be redefined in the proto
- FunctionObject *exec = context->engine->regExpPrototype->get(context->engine->newString(QStringLiteral("exec")), 0).asFunctionObject();
+ FunctionObject *exec = context->engine->regExpClass->prototype->get(context->engine->newString(QStringLiteral("exec")), 0).asFunctionObject();
CALLDATA(1);
d.thisObject = Value::fromObject(rx);