diff options
Diffstat (limited to 'src/qml/qml/v8/qqmlbuiltinfunctions_p.h')
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions_p.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h index dc806c6031..7602a92582 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h +++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h @@ -64,7 +64,7 @@ namespace QV4 { namespace Heap { struct QtObject : Object { - QtObject(QQmlEngine *qmlEngine); + void init(QQmlEngine *qmlEngine); QObject *platform; QObject *application; @@ -77,14 +77,18 @@ struct QtObject : Object { }; struct ConsoleObject : Object { - ConsoleObject(); + void init(); }; struct QQmlBindingFunction : FunctionObject { - QQmlBindingFunction(const QV4::FunctionObject *originalFunction); + void init(const QV4::FunctionObject *originalFunction); + void destroy() { + delete bindingLocation; + Object::destroy(); + } Pointer<FunctionObject> originalFunction; // Set when the binding is created later - QQmlSourceLocation bindingLocation; + QQmlSourceLocation *bindingLocation; }; } @@ -122,6 +126,7 @@ struct QtObject : Object static ReturnedValue method_btoa(CallContext *ctx); static ReturnedValue method_atob(CallContext *ctx); static ReturnedValue method_quit(CallContext *ctx); + static ReturnedValue method_exit(CallContext *ctx); static ReturnedValue method_resolvedUrl(CallContext *ctx); static ReturnedValue method_createQmlObject(CallContext *ctx); static ReturnedValue method_createComponent(CallContext *ctx); @@ -135,6 +140,8 @@ struct QtObject : Object #endif static ReturnedValue method_get_styleHints(CallContext *ctx); + static ReturnedValue method_callLater(CallContext *ctx); + private: void addAll(); ReturnedValue findAndAdd(const QString *name, bool &foundProperty) const; @@ -142,9 +149,7 @@ private: struct ConsoleObject : Object { - typedef Heap::ConsoleObject Data; - const Data *d() const { return static_cast<const Data *>(Object::d()); } - Data *d() { return static_cast<Data *>(Object::d()); } + V4_OBJECT2(ConsoleObject, Object) static ReturnedValue method_error(CallContext *ctx); static ReturnedValue method_log(CallContext *ctx); @@ -186,7 +191,7 @@ struct QQmlBindingFunction : public QV4::FunctionObject void initBindingLocation(); // from caller stack trace - static ReturnedValue call(const Managed *that, CallData *callData); + static void call(const Managed *that, Scope &scope, CallData *callData); static void markObjects(Heap::Base *that, ExecutionEngine *e); }; |