diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
commit | f04c2c40fd7ee91e5cbff2ca4df0fdc30dfbbcd5 (patch) | |
tree | 4e96d097987deb8d4d1a963e911dcbd1641a8502 /src/qml/jsruntime/qv4stringobject.cpp | |
parent | 0da811cdfebdae1d96c99fe681e6a776e73d2f7f (diff) | |
parent | e76ed6a2655894bd671ee7397a15f2e57cfc8d33 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 1989f747e9..829ada0c1a 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -73,15 +73,17 @@ using namespace QV4; DEFINE_OBJECT_VTABLE(StringObject); -Heap::StringObject::StringObject() +void Heap::StringObject::init() { + Object::init(); Q_ASSERT(vtable() == QV4::StringObject::staticVTable()); string = internalClass->engine->id_empty()->d(); *propertyData(LengthPropertyIndex) = Primitive::fromInt32(0); } -Heap::StringObject::StringObject(const QV4::String *str) +void Heap::StringObject::init(const QV4::String *str) { + Object::init(); string = str->d(); *propertyData(LengthPropertyIndex) = Primitive::fromInt32(length()); } @@ -152,9 +154,9 @@ void StringObject::markObjects(Heap::Base *that, ExecutionEngine *e) DEFINE_OBJECT_VTABLE(StringCtor); -Heap::StringCtor::StringCtor(QV4::ExecutionContext *scope) - : Heap::FunctionObject(scope, QStringLiteral("String")) +void Heap::StringCtor::init(QV4::ExecutionContext *scope) { + Heap::FunctionObject::init(scope, QStringLiteral("String")); } void StringCtor::construct(const Managed *m, Scope &scope, CallData *callData) @@ -715,7 +717,7 @@ ReturnedValue StringPrototype::method_split(CallContext *ctx) Scoped<RegExpObject> re(scope, separatorValue); if (re) { - if (re->value()->pattern.isEmpty()) { + if (re->value()->pattern->isEmpty()) { re = (RegExpObject *)0; separatorValue = ctx->d()->engine->newString(); } |