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/types | |
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/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 2 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index b9f78da96e..c0b0b59f1d 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -2383,7 +2383,7 @@ QQmlV4Handle QQmlDelegateModelGroup::get(int index) model->m_compositor.setFlags(it, 1, Compositor::CacheFlag); } - if (model->m_cacheMetaType->modelItemProto.isEmpty()) + if (model->m_cacheMetaType->modelItemProto.isUndefined()) model->m_cacheMetaType->initializePrototype(); QV8Engine *v8 = model->m_cacheMetaType->v8Engine; QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8); diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 20d1211716..4ce5047c8f 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -464,7 +464,7 @@ void ListModel::set(int elementIndex, QV4::Object *object, QVector<int> *roles, if (role.type == ListLayout::Role::VariantMap) roleIndex = e->setVariantMapProperty(role, o, eng); } - } else if (propertyValue.isEmpty() || propertyValue.isUndefined() || propertyValue.isNull()) { + } else if (propertyValue.isUndefined() || propertyValue.isNull()) { const ListLayout::Role *r = m_layout->getExistingRole(propertyName.getPointer()); if (r) e->clearProperty(*r); @@ -540,7 +540,7 @@ void ListModel::set(int elementIndex, QV4::Object *object, QV8Engine *eng) if (role.type == ListLayout::Role::VariantMap) e->setVariantMapFast(role, o, eng); } - } else if (propertyValue.isEmpty() || propertyValue.isUndefined() || propertyValue.isNull()) { + } else if (propertyValue.isUndefined() || propertyValue.isNull()) { const ListLayout::Role *r = m_layout->getExistingRole(propertyName.getPointer()); if (r) e->clearProperty(*r); @@ -1198,7 +1198,7 @@ int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::Value &d } else if (role.type == ListLayout::Role::VariantMap) { roleIndex = setVariantMapProperty(role, o, eng); } - } else if (d.isEmpty() || d.isUndefined() || d.isNull()) { + } else if (d.isUndefined() || d.isNull()) { clearProperty(role); } |