aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-13 14:11:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:14:03 +0200
commit49aead7f236f8b8a6ab85adc4b5eace1c1e4dde6 (patch)
tree21b01c30b568bd79176a5dfe4ec2437e2545660e /src/qml/jsruntime/qv4numberobject.cpp
parent2a43ec129a544d80c9cc3266b5eccce0f6ba66ef (diff)
Extend the ReturnedValue mechanism to pointers to Managed objects
Add a Returned<T> that we can return instead of raw pointers to Managed objects. Start using the Returned<T> for a few methods. Also clean up all our classes to use the Q_MANAGED macro instead of manually defining their vtable. Change-Id: I0a2962e47f3de955cd2cd8474f8f3fcc9e36d084 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index f335e73123..c83d08d450 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -59,7 +59,7 @@ NumberCtor::NumberCtor(ExecutionContext *scope)
ReturnedValue NumberCtor::construct(Managed *m, CallData *callData)
{
double dbl = callData->argc ? callData->args[0].toNumber() : 0.;
- return Value::fromObject(m->engine()->newNumberObject(Value::fromDouble(dbl))).asReturnedValue();
+ return Encode(m->engine()->newNumberObject(Value::fromDouble(dbl)));
}
ReturnedValue NumberCtor::call(Managed *, CallData *callData)