aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-15 21:28:01 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 12:30:35 +0100
commit3dbf4e9a6979802fff55e2f5e6aa54a14280e128 (patch)
tree2bd9090f4bcf01e9c9e43c0d52fcbf80295ca6c0 /src/qml/qml
parent3f3652e43fc001df728ef00403b18d3202e2726a (diff)
Cleanups
Remove duplicated methods. Remove some mostly unused methods, and simplify some others. Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp2
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp12
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp6
3 files changed, 10 insertions, 10 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index e98529a25e..0b76c0f176 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1259,7 +1259,7 @@ void QQmlComponent::createObject(QQmlV4Function *args)
if (!rv)
args->setReturnValue(QV4::Encode::null());
else
- args->setReturnValue(object.asReturnedValue());
+ args->setReturnValue(object->asReturnedValue());
}
/*!
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 946ea01565..c5f1c7bec8 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -137,7 +137,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
if (hasProp) {
if (hasProperty)
*hasProperty = hasProp;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
if (resource->d()->isNullWrapper)
@@ -150,7 +150,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
if (hasProp) {
if (hasProperty)
*hasProperty = hasProp;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
// Its possible we could delay the calculation of the "actual" context (in the case
@@ -161,7 +161,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
if (!context) {
if (hasProperty)
*hasProperty = true;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
// Search type (attached property/enum/imported scripts) names
@@ -240,7 +240,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
if (hasProp) {
if (hasProperty)
*hasProperty = true;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
}
scopeObject = 0;
@@ -253,7 +253,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
if (hasProp) {
if (hasProperty)
*hasProperty = true;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
}
@@ -262,7 +262,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
expressionContext->unresolvedNames = true;
- return Primitive::undefinedValue().asReturnedValue();
+ return Encode::undefined();
}
void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 447ee76952..4e0ff56f4e 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -182,7 +182,7 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
ep->propertyCapture = lastPropertyCapture;
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
void QQmlJavaScriptExpression::GuardCapture::captureProperty(QQmlNotifier *n)
@@ -309,7 +309,7 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scopeObje
}
if (qmlscope)
qmlscope->set(v4, qmlScopeObject);
- return result.asReturnedValue();
+ return result->asReturnedValue();
}
QV4::ReturnedValue QQmlJavaScriptExpression::qmlBinding(QQmlContextData *ctxt, QObject *qmlScope,
@@ -342,7 +342,7 @@ QV4::ReturnedValue QQmlJavaScriptExpression::qmlBinding(QQmlContextData *ctxt, Q
}
if (qmlscope)
qmlscope->set(v4, qmlScopeObject);
- return result.asReturnedValue();
+ return result->asReturnedValue();
}