diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-03 16:41:14 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-03 20:41:04 +0200 |
commit | 5458d5103d6ebdffc31aed0f4c829f04320ecd9e (patch) | |
tree | 953935c6d2c398919f250bd28166faed749e5d88 /src/qml/qml/v8/qv8qobjectwrapper_p.h | |
parent | 94946e6fb412a34f1d0bd3bb550a8ff195976ee6 (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/v8/qv8qobjectwrapper_p.h')
-rw-r--r-- | src/qml/qml/v8/qv8qobjectwrapper_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
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); |