diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-08-29 21:23:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-02 17:27:36 +0200 |
commit | d8e31c098dade7280f21ca9781ba11bee5e4f201 (patch) | |
tree | 793b7e5566e75b9c0ef45693d36cb57839a4233c /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
parent | edee5c3dc0d922ec3b6a44d66193e9a57b8a979e (diff) |
Cleanup calls to Object::setPrototype()
Rather use the correct internalClass directly when constructing
the objects.
Change-Id: I8e916f1ce8f83d291c08ca6332fe85b1f57b90b5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index fe821928b5..1c160edd7a 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -254,8 +254,8 @@ QObjectWrapper::QObjectWrapper(ExecutionEngine *engine, QObject *object) void QObjectWrapper::initializeBindings(ExecutionEngine *engine) { - engine->functionPrototype->defineDefaultProperty(engine, QStringLiteral("connect"), method_connect); - engine->functionPrototype->defineDefaultProperty(engine, QStringLiteral("disconnect"), method_disconnect); + engine->functionClass->prototype->defineDefaultProperty(engine, QStringLiteral("connect"), method_connect); + engine->functionClass->prototype->defineDefaultProperty(engine, QStringLiteral("disconnect"), method_disconnect); } QQmlPropertyData *QObjectWrapper::findProperty(ExecutionEngine *engine, QQmlContextData *qmlContext, String *name, RevisionMode revisionMode, QQmlPropertyData *local) const @@ -340,8 +340,8 @@ Value QObjectWrapper::getQmlProperty(ExecutionContext *ctx, QQmlContextData *qml QV4::String *connect = ctx->engine->newIdentifier(QStringLiteral("connect")); QV4::String *disconnect = ctx->engine->newIdentifier(QStringLiteral("disconnect")); - handler->put(connect, ctx->engine->functionPrototype->get(connect)); - handler->put(disconnect, ctx->engine->functionPrototype->get(disconnect)); + handler->put(connect, ctx->engine->functionClass->prototype->get(connect)); + handler->put(disconnect, ctx->engine->functionClass->prototype->get(disconnect)); return QV4::Value::fromObject(handler); } else { |