diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-12-05 10:45:14 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-01-12 07:04:27 +0000 |
commit | 4e1512baf6d1220c9e89c8a36f16de400bb1b519 (patch) | |
tree | a4edebfeeebfd19e0aba8e376ddf593783f05100 /src/qml/qml/qqmllistwrapper.cpp | |
parent | 4d6830546619d16275b01f1f049fdcb0b6489f7a (diff) |
Convert more builtin functions to use the new calling convention
Convert most of the methods used QML objects to the new calling
convention. Converted IndexedBuiltinFunction to do the same.
Change-Id: I41b26042c2f56f24988485b06e8ccd214e2573c0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllistwrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmllistwrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp index b4be83a156..cdeb991e11 100644 --- a/src/qml/qml/qqmllistwrapper.cpp +++ b/src/qml/qml/qqmllistwrapper.cpp @@ -171,10 +171,10 @@ void PropertyListPrototype::init(ExecutionEngine *) defineDefaultProperty(QStringLiteral("push"), method_push, 1); } -ReturnedValue PropertyListPrototype::method_push(const BuiltinFunction *b, CallData *callData) +ReturnedValue PropertyListPrototype::method_push(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc) { Scope scope(b); - ScopedObject instance(scope, callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, thisObject->toObject(scope.engine)); if (!instance) RETURN_UNDEFINED(); QmlListWrapper *w = instance->as<QmlListWrapper>(); @@ -184,9 +184,9 @@ ReturnedValue PropertyListPrototype::method_push(const BuiltinFunction *b, CallD THROW_GENERIC_ERROR("List doesn't define an Append function"); QV4::ScopedObject so(scope); - for (int i = 0, ei = callData->argc(); i < ei; ++i) + for (int i = 0, ei = argc; i < ei; ++i) { - so = callData->args[i].toObject(scope.engine); + so = argv[i].toObject(scope.engine); if (QV4::QObjectWrapper *wrapper = so->as<QV4::QObjectWrapper>()) w->d()->property().append(&w->d()->property(), wrapper->object() ); } |