aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-17 18:16:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit21198a676128a52e892557bc434035bcd1ddfaac (patch)
tree10b165b797a7723507b8da375444549a5420e1e8 /src/qml/qml/qqmlvmemetaobject.cpp
parente441692b0b8f8fffdfdfa8a21c570adcd5cbae7a (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/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 6739143979..e3a6621ab4 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -71,7 +71,7 @@ QQmlVMEVariantQObjectPtr::~QQmlVMEVariantQObjectPtr()
void QQmlVMEVariantQObjectPtr::objectDestroyed(QObject *)
{
if (m_target && m_index >= 0) {
- if (m_isVar && m_target->varPropertiesInitialized && !m_target->varProperties.isEmpty()) {
+ if (m_isVar && m_target->varPropertiesInitialized && !m_target->varProperties.isUndefined()) {
// Set the var property to NULL
QV4::ArrayObject *a = m_target->varProperties.value().asArrayObject();
if (a)
@@ -966,13 +966,13 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index)
{
if (!ctxt || !ctxt->isValid()) {
qWarning("QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context");
- return QV4::Value::emptyValue().asReturnedValue();
+ return QV4::Value::undefinedValue().asReturnedValue();
}
if (!v8methods)
v8methods = new QV4::PersistentValue[metaData->methodCount];
- if (v8methods[index].isEmpty()) {
+ if (v8methods[index].isUndefined()) {
QQmlVMEMetaData::MethodData *data = metaData->methodData() + index;
const char *body = ((const char*)metaData) + data->bodyOffset;
@@ -994,7 +994,7 @@ QV4::ReturnedValue QQmlVMEMetaObject::readVarProperty(int id)
if (ensureVarPropertiesAllocated())
return varProperties.value().asObject()->getIndexed(id - firstVarPropertyIndex);
- return QV4::Value::emptyValue().asReturnedValue();
+ return QV4::Value::undefinedValue().asReturnedValue();
}
QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id)
@@ -1208,7 +1208,7 @@ bool QQmlVMEMetaObject::ensureVarPropertiesAllocated()
// QObject ptr will not yet have been deleted (eg, waiting on deleteLater).
// In this situation, the varProperties handle will be (and should remain)
// empty.
- return !varProperties.isEmpty();
+ return !varProperties.isUndefined();
}
void QQmlVMEMetaObject::ensureQObjectWrapper()