aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index ab802cabce..6fd312ab24 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -76,6 +76,17 @@ using namespace QV4;
DEFINE_MANAGED_VTABLE(StringObject);
+StringObject::StringObject(InternalClass *ic)
+ : Object(ic), value(Value::fromString(ic->engine, ""))
+{
+ vtbl = &static_vtbl;
+ type = Type_StringObject;
+
+ tmpProperty.value = Value::undefinedValue();
+
+ defineReadonlyProperty(ic->engine->id_length, Value::fromInt32(0));
+}
+
StringObject::StringObject(ExecutionEngine *engine, const Value &value)
: Object(engine), value(value)
{