diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-15 21:54:12 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-23 12:30:38 +0100 |
commit | ef6b4938b9ec309d5faf0c966cb2b58f3de2ca77 (patch) | |
tree | 3d946ad66defb1ec5c60a50e16b6e7883ec33862 /src/qml/qml/qqmlcomponent.cpp | |
parent | 3dbf4e9a6979802fff55e2f5e6aa54a14280e128 (diff) |
Cleanups
Simplify some code in BooleanObject
Simplify access to call arguments and thisObject
Change-Id: I2f8e844019bc587385608beb02f05b15f827535c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 0b76c0f176..428c59767b 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1420,7 +1420,7 @@ QQmlComponentExtension::QQmlComponentExtension(QV4::ExecutionEngine *v4) QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_object(QV4::CallContext *ctx) { QV4::Scope scope(ctx); - QV4::Scoped<QmlIncubatorObject> o(scope, ctx->d()->callData->thisObject.as<QmlIncubatorObject>()); + QV4::Scoped<QmlIncubatorObject> o(scope, ctx->thisObject().as<QmlIncubatorObject>()); if (!o) return ctx->engine()->throwTypeError(); @@ -1430,7 +1430,7 @@ QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_object(QV4::CallContext * QV4::ReturnedValue QV4::QmlIncubatorObject::method_forceCompletion(QV4::CallContext *ctx) { QV4::Scope scope(ctx); - QV4::Scoped<QmlIncubatorObject> o(scope, ctx->d()->callData->thisObject.as<QmlIncubatorObject>()); + QV4::Scoped<QmlIncubatorObject> o(scope, ctx->thisObject().as<QmlIncubatorObject>()); if (!o) return ctx->engine()->throwTypeError(); @@ -1442,7 +1442,7 @@ QV4::ReturnedValue QV4::QmlIncubatorObject::method_forceCompletion(QV4::CallCont QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_status(QV4::CallContext *ctx) { QV4::Scope scope(ctx); - QV4::Scoped<QmlIncubatorObject> o(scope, ctx->d()->callData->thisObject.as<QmlIncubatorObject>()); + QV4::Scoped<QmlIncubatorObject> o(scope, ctx->thisObject().as<QmlIncubatorObject>()); if (!o) return ctx->engine()->throwTypeError(); @@ -1452,7 +1452,7 @@ QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_status(QV4::CallContext * QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_statusChanged(QV4::CallContext *ctx) { QV4::Scope scope(ctx); - QV4::Scoped<QmlIncubatorObject> o(scope, ctx->d()->callData->thisObject.as<QmlIncubatorObject>()); + QV4::Scoped<QmlIncubatorObject> o(scope, ctx->thisObject().as<QmlIncubatorObject>()); if (!o) return ctx->engine()->throwTypeError(); @@ -1462,12 +1462,12 @@ QV4::ReturnedValue QV4::QmlIncubatorObject::method_get_statusChanged(QV4::CallCo QV4::ReturnedValue QV4::QmlIncubatorObject::method_set_statusChanged(QV4::CallContext *ctx) { QV4::Scope scope(ctx); - QV4::Scoped<QmlIncubatorObject> o(scope, ctx->d()->callData->thisObject.as<QmlIncubatorObject>()); - if (!o || ctx->d()->callData->argc < 1) + QV4::Scoped<QmlIncubatorObject> o(scope, ctx->thisObject().as<QmlIncubatorObject>()); + if (!o || ctx->argc() < 1) return ctx->engine()->throwTypeError(); - o->d()->statusChanged = ctx->d()->callData->args[0]; + o->d()->statusChanged = ctx->args()[0]; return QV4::Encode::undefined(); } |