diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-03 15:23:05 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-09 02:01:17 +0100 |
commit | 412eb94de4cae754130ae855236420ebd5c42482 (patch) | |
tree | 901af6051691c65a96abe3f69fcd3d5fc57ff80a /src/qml/util | |
parent | e367f75d7285d2bcd10cbb35d088c96f33c02aff (diff) |
Simplify & speed up function calling
Get rid of the SimpleCallContext, instead simply
use the CallContext data structure, but don't
initialize the unused variables.
Change-Id: I11b311986da180c62c815b516a2c55844156d0ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/util')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index e8efd46039..9cd5709a49 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -63,7 +63,7 @@ public: V8_DEFINE_EXTENSION(QQmlAdaptorModelEngineData, engineData) -static QV4::ReturnedValue get_index(QV4::SimpleCallContext *ctx) +static QV4::ReturnedValue get_index(QV4::CallContext *ctx) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); @@ -108,8 +108,8 @@ public: void setValue(const QString &role, const QVariant &value); bool resolveIndex(const QQmlAdaptorModel &model, int idx); - static QV4::ReturnedValue get_property(QV4::SimpleCallContext *ctx, uint propertyId); - static QV4::ReturnedValue set_property(QV4::SimpleCallContext *ctx, uint propertyId); + static QV4::ReturnedValue get_property(QV4::CallContext *ctx, uint propertyId); + static QV4::ReturnedValue set_property(QV4::CallContext *ctx, uint propertyId); VDMModelDelegateDataType *type; QVector<QVariant> cachedData; @@ -195,7 +195,7 @@ public: dataType->watchedRoles += newRoles; } - static QV4::ReturnedValue get_hasModelChildren(QV4::SimpleCallContext *ctx) + static QV4::ReturnedValue get_hasModelChildren(QV4::CallContext *ctx) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); @@ -339,7 +339,7 @@ bool QQmlDMCachedModelData::resolveIndex(const QQmlAdaptorModel &, int idx) } } -QV4::ReturnedValue QQmlDMCachedModelData::get_property(QV4::SimpleCallContext *ctx, uint propertyId) +QV4::ReturnedValue QQmlDMCachedModelData::get_property(QV4::CallContext *ctx, uint propertyId) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); @@ -359,7 +359,7 @@ QV4::ReturnedValue QQmlDMCachedModelData::get_property(QV4::SimpleCallContext *c return QV4::Encode::undefined(); } -QV4::ReturnedValue QQmlDMCachedModelData::set_property(QV4::SimpleCallContext *ctx, uint propertyId) +QV4::ReturnedValue QQmlDMCachedModelData::set_property(QV4::CallContext *ctx, uint propertyId) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); @@ -579,7 +579,7 @@ public: } } - static QV4::ReturnedValue get_modelData(QV4::SimpleCallContext *ctx) + static QV4::ReturnedValue get_modelData(QV4::CallContext *ctx) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); @@ -589,7 +589,7 @@ public: return ctx->engine->v8Engine->fromVariant(static_cast<QQmlDMListAccessorData *>(o->item)->cachedData); } - static QV4::ReturnedValue set_modelData(QV4::SimpleCallContext *ctx) + static QV4::ReturnedValue set_modelData(QV4::CallContext *ctx) { QV4::Scope scope(ctx); QV4::Scoped<QQmlDelegateModelItemObject> o(scope, ctx->callData->thisObject.as<QQmlDelegateModelItemObject>()); |