aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-04 15:34:56 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-08 19:48:10 +0100
commit04bf728d7d02c56f9f526bf0b71b31690a5e9e92 (patch)
tree61b8fcb6032a2b1018a6de27308cf4c3158f2fa4 /src/qml/qml/v8/qqmlbuiltinfunctions_p.h
parent980e7fae0a010d519907a58ab891cc6ca94eb56a (diff)
Move Data of the builtin functions to the Heap namespace
Change-Id: I8a77fe3fa9b6538cf6c75817eae7dc34df8ab329 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/v8/qqmlbuiltinfunctions_p.h')
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
index 696cf04397..8379cbc3a0 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
@@ -55,15 +55,30 @@ class QV8Engine;
namespace QV4 {
+namespace Heap {
+
+struct QtObject : Object {
+ QtObject(ExecutionEngine *v4, QQmlEngine *qmlEngine);
+ QObject *platform;
+ QObject *application;
+};
+
+struct ConsoleObject : Object {
+ ConsoleObject(ExecutionEngine *engine);
+};
+
+struct QQmlBindingFunction : FunctionObject {
+ QQmlBindingFunction(QV4::FunctionObject *originalFunction);
+ QV4::FunctionObject *originalFunction;
+ // Set when the binding is created later
+ QQmlSourceLocation bindingLocation;
+};
+
+}
+
struct QtObject : Object
{
- struct Data : Heap::Object {
- Data(ExecutionEngine *v4, QQmlEngine *qmlEngine);
- QObject *platform;
- QObject *application;
- };
- V4_OBJECT(Object)
-
+ V4_OBJECT2(QtObject, Object)
static ReturnedValue method_isQtObject(CallContext *ctx);
static ReturnedValue method_rgba(CallContext *ctx);
@@ -105,9 +120,7 @@ struct QtObject : Object
struct ConsoleObject : Object
{
- struct Data : Heap::Object {
- Data(ExecutionEngine *engine);
- };
+ typedef Heap::ConsoleObject Data;
static ReturnedValue method_error(CallContext *ctx);
static ReturnedValue method_log(CallContext *ctx);
@@ -143,13 +156,7 @@ struct GlobalExtensions {
struct QQmlBindingFunction : public QV4::FunctionObject
{
- struct Data : Heap::FunctionObject {
- Data(QV4::FunctionObject *originalFunction);
- QV4::FunctionObject *originalFunction;
- // Set when the binding is created later
- QQmlSourceLocation bindingLocation;
- };
- V4_OBJECT(QV4::FunctionObject)
+ V4_OBJECT2(QQmlBindingFunction, FunctionObject)
void initBindingLocation(); // from caller stack trace