aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-04 15:25:09 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-08 19:48:00 +0100
commit980e7fae0a010d519907a58ab891cc6ca94eb56a (patch)
tree3d0aec781e52b49beeaf3ef990e9196746fb6a06 /src/qml/jsruntime/qv4dateobject_p.h
parentf3f86c5eaed6940c6b90132c811cbf04ff9a8e81 (diff)
Move Data of Variant and ArgumentsObject into Heap namespace
Change-Id: Id2092a15c9fb5341d9b5cf4a9ac7a978308e4174 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index a3d1f23b1d..4eba963fac 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -43,23 +43,27 @@ class QDateTime;
namespace QV4 {
+namespace Heap {
+
+struct DateObject : Object {
+ DateObject(QV4::ExecutionEngine *engine, const ValueRef date)
+ : Object(engine->dateClass)
+ {
+ value = date;
+ }
+ DateObject(QV4::ExecutionEngine *engine, const QDateTime &date);
+ inline DateObject(InternalClass *ic);
+ Value value;
+};
+
+struct DateCtor : FunctionObject {
+ DateCtor(QV4::ExecutionContext *scope);
+};
+
+}
+
struct DateObject: Object {
- struct Data : Heap::Object {
- Data(ExecutionEngine *engine, const ValueRef date)
- : Heap::Object(engine->dateClass)
- {
- value = date;
- }
- Data(ExecutionEngine *engine, const QDateTime &date);
- Data(InternalClass *ic)
- : Heap::Object(ic)
- {
- Q_ASSERT(internalClass->vtable == staticVTable());
- value = Primitive::fromDouble(qSNaN());
- }
- Value value;
- };
- V4_OBJECT(Object)
+ V4_OBJECT2(DateObject, Object)
Q_MANAGED_TYPE(DateObject)
@@ -70,12 +74,16 @@ struct DateObject: Object {
QDateTime toQDateTime() const;
};
+Heap::DateObject::DateObject(InternalClass *ic)
+ : Heap::Object(ic)
+{
+ Q_ASSERT(internalClass->vtable == QV4::DateObject::staticVTable());
+ value = Primitive::fromDouble(qSNaN());
+}
+
struct DateCtor: FunctionObject
{
- struct Data : Heap::FunctionObject {
- Data(ExecutionContext *scope);
- };
- V4_OBJECT(FunctionObject)
+ V4_OBJECT2(DateCtor, FunctionObject)
static ReturnedValue construct(Managed *, CallData *callData);
static ReturnedValue call(Managed *that, CallData *);