diff options
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index aa8e850aed..8e9bf794a9 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -94,7 +94,7 @@ void Heap::Object::setUsedAsProto() bool Object::setPrototype(Object *proto) { - Heap::Object *p = proto ? proto->d() : 0; + Heap::Object *p = proto ? proto->d() : nullptr; Heap::Object *pp = p; while (pp) { if (pp == d()) @@ -193,8 +193,8 @@ void Object::defineAccessorProperty(String *name, ReturnedValue (*getter)(const QV4::Scope scope(v4); ScopedProperty p(scope); ExecutionContext *global = v4->rootContext(); - p->setGetter(ScopedFunctionObject(scope, (getter ? FunctionObject::createBuiltinFunction(global, name, getter) : 0))); - p->setSetter(ScopedFunctionObject(scope, (setter ? FunctionObject::createBuiltinFunction(global, name, setter) : 0))); + p->setGetter(ScopedFunctionObject(scope, (getter ? FunctionObject::createBuiltinFunction(global, name, getter) : nullptr))); + p->setSetter(ScopedFunctionObject(scope, (setter ? FunctionObject::createBuiltinFunction(global, name, setter) : nullptr))); insertMember(name, p, QV4::Attr_Accessor|QV4::Attr_NotConfigurable|QV4::Attr_NotEnumerable); } @@ -321,7 +321,7 @@ MemberData::Index Object::getValueOrSetter(String *name, PropertyAttributes *att o = o->prototype(); } *attrs = Attr_Invalid; - return { 0, 0 }; + return { nullptr, nullptr }; } ArrayData::Index Object::getValueOrSetter(uint index, PropertyAttributes *attrs) @@ -346,7 +346,7 @@ ArrayData::Index Object::getValueOrSetter(uint index, PropertyAttributes *attrs) o = o->prototype(); } *attrs = Attr_Invalid; - return { 0, 0 }; + return { nullptr, 0 }; } bool Object::hasProperty(String *name) const @@ -484,7 +484,7 @@ bool Object::deleteIndexedProperty(Managed *m, uint index) void Object::advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *pd, PropertyAttributes *attrs) { Object *o = static_cast<Object *>(m); - name->setM(0); + name->setM(nullptr); *index = UINT_MAX; if (o->arrayData()) { @@ -508,7 +508,7 @@ void Object::advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint * return; } } - it->arrayNode = 0; + it->arrayNode = nullptr; it->arrayIndex = UINT_MAX; } // dense arrays @@ -628,7 +628,7 @@ bool Object::internalPut(String *name, const Value &value) name->makeIdentifier(); Identifier *id = name->identifier(); - MemberData::Index memberIndex{0, 0}; + MemberData::Index memberIndex{nullptr, nullptr}; uint member = internalClass()->find(id); PropertyAttributes attrs; if (member < UINT_MAX) { @@ -704,7 +704,7 @@ bool Object::internalPutIndexed(uint index, const Value &value) PropertyAttributes attrs; - ArrayData::Index arrayIndex = arrayData() ? arrayData()->getValueOrSetter(index, &attrs) : ArrayData::Index{ 0, 0 }; + ArrayData::Index arrayIndex = arrayData() ? arrayData()->getValueOrSetter(index, &attrs) : ArrayData::Index{ nullptr, 0 }; if (arrayIndex.isNull() && isStringObject()) { if (index < static_cast<StringObject *>(this)->length()) @@ -898,7 +898,7 @@ bool Object::defineOwnProperty2(ExecutionEngine *engine, uint index, const Prope return true; } - return __defineOwnProperty__(engine, index, 0, p, attrs); + return __defineOwnProperty__(engine, index, nullptr, p, attrs); } bool Object::__defineOwnProperty__(ExecutionEngine *engine, uint index, String *member, const Property *p, PropertyAttributes attrs) @@ -949,8 +949,8 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, uint index, String * Q_ASSERT(arrayData()); setArrayAttributes(index, cattrs); } - current->setGetter(0); - current->setSetter(0); + current->setGetter(nullptr); + current->setSetter(nullptr); } else { // 9c cattrs.setType(PropertyAttributes::Data); |