aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index abdb938e52..228f94503f 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1459,7 +1459,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
const QQmlPropertyData &core,
QQmlContextData *context,
QQmlJavaScriptExpression *expression,
- const QV4::ValueRef result, bool isUndefined,
+ const QV4::Value &result, bool isUndefined,
WriteFlags flags)
{
Q_ASSERT(object);
@@ -1481,22 +1481,22 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
if (!isUndefined && !core.isValueTypeVirtual()) {
switch (core.propType) {
case QMetaType::Int:
- if (result->isInteger())
- QUICK_STORE(int, result->integerValue())
- else if (result->isNumber())
- QUICK_STORE(int, result->doubleValue())
+ if (result.isInteger())
+ QUICK_STORE(int, result.integerValue())
+ else if (result.isNumber())
+ QUICK_STORE(int, result.doubleValue())
break;
case QMetaType::Double:
- if (result->isNumber())
- QUICK_STORE(double, result->asDouble())
+ if (result.isNumber())
+ QUICK_STORE(double, result.asDouble())
break;
case QMetaType::Float:
- if (result->isNumber())
- QUICK_STORE(float, result->asDouble())
+ if (result.isNumber())
+ QUICK_STORE(float, result.asDouble())
break;
case QMetaType::QString:
- if (result->isString())
- QUICK_STORE(QString, result->toQStringNoThrow())
+ if (result.isString())
+ QUICK_STORE(QString, result.toQStringNoThrow())
break;
default:
break;
@@ -1514,7 +1514,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
if (isUndefined) {
} else if (core.isQList()) {
value = QV8Engine::getV4(v8engine)->toVariant(result, qMetaTypeId<QList<QObject *> >());
- } else if (result->isNull() && core.isQObject()) {
+ } else if (result.isNull() && core.isQObject()) {
value = QVariant::fromValue((QObject *)0);
} else if (core.propType == qMetaTypeId<QList<QUrl> >()) {
value = resolvedUrlSequence(QV8Engine::getV4(v8engine)->toVariant(result, qMetaTypeId<QList<QUrl> >()), context);
@@ -1525,7 +1525,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
if (expression->hasError()) {
return false;
} else if (isVarProperty) {
- QV4::FunctionObject *f = result->asFunctionObject();
+ QV4::FunctionObject *f = result.asFunctionObject();
if (f && f->isBinding()) {
// we explicitly disallow this case to avoid confusion. Users can still store one
// in an array in a var property if they need to, but the common case is user error.
@@ -1543,7 +1543,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
} else if (isUndefined && type == qMetaTypeId<QVariant>()) {
writeValueProperty(object, core, QVariant(), context, flags);
} else if (type == qMetaTypeId<QJSValue>()) {
- QV4::FunctionObject *f = result->asFunctionObject();
+ QV4::FunctionObject *f = result.asFunctionObject();
if (f && f->isBinding()) {
expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration."));
expression->delayedError()->setErrorObject(object);
@@ -1561,7 +1561,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
expression->delayedError()->setErrorDescription(errorStr);
expression->delayedError()->setErrorObject(object);
return false;
- } else if (QV4::FunctionObject *f = result->asFunctionObject()) {
+ } else if (QV4::FunctionObject *f = result.asFunctionObject()) {
if (f->isBinding())
expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration."));
else