diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-17 18:16:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | 21198a676128a52e892557bc434035bcd1ddfaac (patch) | |
tree | 10b165b797a7723507b8da375444549a5420e1e8 /src/qml/qml/qqmlcomponent.cpp | |
parent | e441692b0b8f8fffdfdfa8a21c570adcd5cbae7a (diff) |
Don't use Value::emptyValue() anymore.
emptyValue is special and reserved for usage inside the
engine to mark missing values. The main to use cases
are when converting property descriptors, and to mark
holes in array data.
Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 149cbf2c49..623efb54b2 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1206,7 +1206,7 @@ void QQmlComponent::createObject(QQmlV4Function *args) Q_ASSERT(args); QObject *parent = 0; - QV4::Value valuemap = QV4::Value::emptyValue(); + QV4::Value valuemap = QV4::Value::undefinedValue(); if (args->length() >= 1) { if (QV4::QObjectWrapper *qobjectWrapper = (*args)[0].as<QV4::QObjectWrapper>()) @@ -1242,7 +1242,7 @@ void QQmlComponent::createObject(QQmlV4Function *args) QV4::ScopedValue object(scope, QV4::QObjectWrapper::wrap(v4engine, rv)); Q_ASSERT(object->isObject()); - if (!valuemap.isEmpty()) { + if (!valuemap.isUndefined()) { QQmlComponentExtension *e = componentExtension(v8engine); QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(v4engine, QString::fromLatin1(INITIALPROPERTIES_SOURCE), args->qmlGlobal().asObject())); QV4::ScopedCallData callData(scope, 2); @@ -1330,7 +1330,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) Q_ASSERT(args); QObject *parent = 0; - QV4::Value valuemap = QV4::Value::emptyValue(); + QV4::Value valuemap = QV4::Value::undefinedValue(); QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous; if (args->length() >= 1) { @@ -1364,7 +1364,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) QmlIncubatorObject *r = new (v4->memoryManager) QmlIncubatorObject(args->engine(), mode); r->setPrototype(e->incubationProto.value().asObject()); - if (!valuemap.isEmpty()) { + if (!valuemap.isUndefined()) { r->valuemap = valuemap; r->qmlGlobal = args->qmlGlobal(); } @@ -1390,7 +1390,7 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu QV4::ScopedValue object(scope, QV4::QObjectWrapper::wrap(v4engine, toCreate)); Q_ASSERT(object->asObject()); - if (!valuemap.isEmpty()) { + if (!valuemap.isUndefined()) { QQmlComponentExtension *e = componentExtension(v8engine); QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(QV8Engine::getV4(v8engine), QString::fromLatin1(INITIALPROPERTIES_SOURCE), qmlGlobal.asObject())); @@ -1492,7 +1492,7 @@ void QmlIncubatorObject::setInitialState(QObject *o) { QQmlComponent_setQmlParent(o, parent); - if (!valuemap.isEmpty()) { + if (!valuemap.isUndefined()) { QQmlComponentExtension *e = componentExtension(v8); QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8); |