diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-02 20:35:57 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-02 22:29:27 +0100 |
commit | 06479ddfe3a9319fd371cd50f4d2f2316d51055a (patch) | |
tree | 6239592028143718b64a9e6621c59e8185a7698a /tests/auto/qml/qqmllanguage/testtypes.cpp | |
parent | 57665bf23a00eca240d26c6267ca2bed1a052c0b (diff) |
[new compiler] Add the correct object index to the custom parser
Without the correct index the calls to astForBinding run out of bounds. Fixes
tst_qqmllistmodel crash.
Change-Id: I6fb8b77866cbf247e7373cdbece6833c92be3615
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp index b18e6133cb..895d5e75da 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.cpp +++ b/tests/auto/qml/qqmllanguage/testtypes.cpp @@ -127,8 +127,9 @@ QByteArray CustomBindingParser::compile(const QList<QQmlCustomParserProperty> &p return result; } -QByteArray CustomBindingParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) +QByteArray CustomBindingParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &bindings) { + Q_UNUSED(objectIndex) QByteArray result; QDataStream ds(&result, QIODevice::WriteOnly); @@ -222,9 +223,10 @@ QByteArray EnumSupportingCustomParser::compile(const QList<QQmlCustomParserPrope return QByteArray(); } -QByteArray EnumSupportingCustomParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) +QByteArray EnumSupportingCustomParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &bindings) { Q_UNUSED(qmlUnit) + Q_UNUSED(objectIndex) if (bindings.count() != 1) { error(bindings.first(), QStringLiteral("Custom parser invoked incorrectly for unit test")); |