aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-03 20:46:55 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-08 19:47:51 +0100
commitf3f86c5eaed6940c6b90132c811cbf04ff9a8e81 (patch)
tree84bb0eb701e5eb9bea5b039c1fc042df718af588 /src/qml/jsruntime
parent5117c8e79c6d3933a0724b78fde9297a03741239 (diff)
Use Heap namespace for data of QObjectWrapper related classes
Change-Id: Id6c3af9e4f995972ae3bec465b2fd293be05de4c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp8
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper_p.h28
2 files changed, 19 insertions, 17 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 59bdf33c55..33e30fbabd 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1754,13 +1754,13 @@ ReturnedValue QObjectMethod::create(ExecutionContext *scope, QObject *object, in
return (scope->d()->engine->memoryManager->alloc<QObjectMethod>(scope, object, index, qmlGlobal))->asReturnedValue();
}
-QObjectMethod::Data::Data(ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal)
+Heap::QObjectMethod::QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal)
: Heap::FunctionObject(scope)
, object(object)
, index(index)
, qmlGlobal(qmlGlobal)
{
- setVTable(staticVTable());
+ setVTable(QV4::QObjectMethod::staticVTable());
subtype = WrappedQtMethod;
}
@@ -1889,12 +1889,12 @@ ReturnedValue QObjectMethod::callInternal(CallData *callData)
DEFINE_OBJECT_VTABLE(QObjectMethod);
-QmlSignalHandler::Data::Data(ExecutionEngine *engine, QObject *object, int signalIndex)
+Heap::QmlSignalHandler::QmlSignalHandler(QV4::ExecutionEngine *engine, QObject *object, int signalIndex)
: Heap::Object(engine)
, object(object)
, signalIndex(signalIndex)
{
- setVTable(staticVTable());
+ setVTable(QV4::QmlSignalHandler::staticVTable());
}
DEFINE_OBJECT_VTABLE(QmlSignalHandler);
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h
index 746c158214..8f04c341c2 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h
@@ -74,6 +74,19 @@ struct QObjectWrapper : Object {
QPointer<QObject> object;
};
+struct QObjectMethod : FunctionObject {
+ QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal);
+ QPointer<QObject> object;
+ int index;
+ QV4::PersistentValue qmlGlobal;
+};
+
+struct QmlSignalHandler : Object {
+ QmlSignalHandler(QV4::ExecutionEngine *engine, QObject *object, int signalIndex);
+ QPointer<QObject> object;
+ int signalIndex;
+};
+
}
struct Q_QML_EXPORT QObjectWrapper : public Object
@@ -122,13 +135,7 @@ private:
struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject
{
- struct Data : QV4::Heap::FunctionObject {
- Data(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal);
- QPointer<QObject> object;
- int index;
- QV4::PersistentValue qmlGlobal;
- };
- V4_OBJECT(QV4::FunctionObject)
+ V4_OBJECT2(QObjectMethod, QV4::FunctionObject)
enum { DestroyMethod = -1, ToStringMethod = -2 };
@@ -152,12 +159,7 @@ struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject
struct QmlSignalHandler : public QV4::Object
{
- struct Data : QV4::Heap::Object {
- Data(ExecutionEngine *engine, QObject *object, int signalIndex);
- QPointer<QObject> object;
- int signalIndex;
- };
- V4_OBJECT(QV4::Object)
+ V4_OBJECT2(QmlSignalHandler, QV4::Object)
int signalIndex() const { return d()->signalIndex; }