aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 5d0c8ccf8e..a9ef29618c 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -641,13 +641,12 @@ static double getLocalTZA()
#endif
}
-DEFINE_MANAGED_VTABLE(DateObject);
+DEFINE_OBJECT_VTABLE(DateObject);
DateObject::DateObject(ExecutionEngine *engine, const QDateTime &date)
: Object(engine->dateClass)
{
- setVTable(&static_vtbl);
- type = Type_DateObject;
+ setVTable(staticVTable());
value.setDouble(date.isValid() ? date.toMSecsSinceEpoch() : qSNaN());
}
@@ -656,12 +655,12 @@ QDateTime DateObject::toQDateTime() const
return ToDateTime(value.asDouble(), Qt::LocalTime);
}
-DEFINE_MANAGED_VTABLE(DateCtor);
+DEFINE_OBJECT_VTABLE(DateCtor);
DateCtor::DateCtor(ExecutionContext *scope)
: FunctionObject(scope, QStringLiteral("Date"))
{
- setVTable(&static_vtbl);
+ setVTable(staticVTable());
}
ReturnedValue DateCtor::construct(Managed *m, CallData *callData)