diff options
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject_p.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h index e3615d76a7..2d0648396e 100644 --- a/src/qml/jsruntime/qv4dateobject_p.h +++ b/src/qml/jsruntime/qv4dateobject_p.h @@ -63,22 +63,26 @@ namespace QV4 { namespace Heap { struct DateObject : Object { - DateObject() + void init() { + Object::init(); date = qt_qnan(); } - DateObject(const Value &date) + void init(const Value &date) { + Object::init(); this->date = date.toNumber(); } - DateObject(const QDateTime &date); + void init(const QDateTime &date); + void init(const QTime &time); + double date; }; struct DateCtor : FunctionObject { - DateCtor(QV4::ExecutionContext *scope); + void init(QV4::ExecutionContext *scope); }; } @@ -104,8 +108,8 @@ struct DateCtor: FunctionObject { V4_OBJECT2(DateCtor, FunctionObject) - static ReturnedValue construct(const Managed *, CallData *callData); - static ReturnedValue call(const Managed *that, CallData *); + static void construct(const Managed *, Scope &scope, CallData *callData); + static void call(const Managed *that, Scope &scope, CallData *); }; struct DatePrototype: DateObject |