aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-13 17:07:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:14:08 +0200
commit9dcc12d52343960400192c817f54a16f7e1f8247 (patch)
tree24d4b194f6dd2f5b35296dfb8b385f6e714611c0 /src/qml/jsruntime/qv4dateobject.cpp
parent19f7850176e95fb181efb45b2c9a5319582a086c (diff)
Convert a few more methods in ExecutionEngine to use protected pointers
Change-Id: I2e6b1b9dff52bbd16f35a00152c9ac557f8346eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 26e9a4af0e..7707d188ee 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -634,9 +634,12 @@ static double getLocalTZA()
#endif
}
+DEFINE_MANAGED_VTABLE(DateObject);
+
DateObject::DateObject(ExecutionEngine *engine, const QDateTime &date)
: Object(engine->dateClass)
{
+ vtbl = &static_vtbl;
type = Type_DateObject;
value = Value::fromDouble(date.toMSecsSinceEpoch());
}
@@ -689,8 +692,7 @@ ReturnedValue DateCtor::construct(Managed *m, CallData *callData)
t = TimeClip(UTC(t));
}
- Object *o = m->engine()->newDateObject(Value::fromDouble(t));
- return Value::fromObject(o).asReturnedValue();
+ return Encode(m->engine()->newDateObject(Value::fromDouble(t)));
}
ReturnedValue DateCtor::call(Managed *m, CallData *)