aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-02 20:35:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-02 22:29:27 +0100
commit06479ddfe3a9319fd371cd50f4d2f2316d51055a (patch)
tree6239592028143718b64a9e6621c59e8185a7698a /tests/auto/qml/qqmllanguage/testtypes.h
parent57665bf23a00eca240d26c6267ca2bed1a052c0b (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.h')
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index 5086180da1..fb1dc3ca67 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -723,7 +723,7 @@ class MyCustomParserTypeParser : public QQmlCustomParser
{
public:
QByteArray compile(const QList<QQmlCustomParserProperty> &) { return QByteArray(); }
- QByteArray compile(const QV4::CompiledData::QmlUnit *, const QList<const QV4::CompiledData::Binding *> &) { return QByteArray(); }
+ QByteArray compile(const QV4::CompiledData::QmlUnit *, int, const QList<const QV4::CompiledData::Binding *> &) { return QByteArray(); }
void setCustomData(QObject *, const QByteArray &) {}
};
@@ -731,7 +731,7 @@ class EnumSupportingCustomParser : public QQmlCustomParser
{
public:
QByteArray compile(const QList<QQmlCustomParserProperty> &props);
- QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings);
+ QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &bindings);
void setCustomData(QObject *, const QByteArray &) {}
};
@@ -1103,7 +1103,7 @@ public:
class CustomBindingParser : public QQmlCustomParser
{
virtual QByteArray compile(const QList<QQmlCustomParserProperty> &properties);
- virtual QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings);
+ virtual QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &bindings);
virtual void setCustomData(QObject *object, const QByteArray &data);
};