From 5458d5103d6ebdffc31aed0f4c829f04320ecd9e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 3 Jun 2013 16:41:14 +0200 Subject: Get rid of inner MethodClosure object in QV8QObjectWrapper Instead let's have a convenient create function in QV4::QObjectMethod Change-Id: I7369e614993eebcf9cbb5bc186979dcaa2b2593c Reviewed-by: Lars Knoll --- src/qml/qml/v8/qv8qobjectwrapper_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/v8/qv8qobjectwrapper_p.h') diff --git a/src/qml/qml/v8/qv8qobjectwrapper_p.h b/src/qml/qml/v8/qv8qobjectwrapper_p.h index f8d128fc57..c50fd461a6 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper_p.h +++ b/src/qml/qml/v8/qv8qobjectwrapper_p.h @@ -119,12 +119,14 @@ struct QObjectMethod : public QV4::FunctionObject enum { DestroyMethod = -1, ToStringMethod = -2 }; - QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const QV4::Value &qmlGlobal); + static Value create(QV4::ExecutionContext *scope, QObject *object, int index, const Value &qmlGlobal = Value::undefinedValue()); int methodIndex() const { return m_index; } QObject *object() const { return m_object.data(); } private: + QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const QV4::Value &qmlGlobal); + QV4::Value method_toString(QV4::ExecutionContext *ctx); QV4::Value method_destroy(QV4::ExecutionContext *ctx, Value *args, int argc); -- cgit v1.2.3