aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodel_p.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 /src/qml/types/qqmllistmodel_p.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 'src/qml/types/qqmllistmodel_p.h')
-rw-r--r--src/qml/types/qqmllistmodel_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 172d857687..1fd57f063c 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -160,7 +160,7 @@ class QQmlListModelParser : public QQmlCustomParser
public:
QQmlListModelParser() : QQmlCustomParser(QQmlCustomParser::AcceptsSignalHandlers) {}
QByteArray compile(const QList<QQmlCustomParserProperty> &);
- 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 &);
private:
@@ -176,7 +176,7 @@ private:
ListInstruction *instructions() const;
};
bool compileProperty(const QQmlCustomParserProperty &prop, QList<ListInstruction> &instr, QByteArray &data);
- bool compileProperty(const QV4::CompiledData::QmlUnit *qmlUnit, const QV4::CompiledData::Binding *binding, QList<ListInstruction> &instr, QByteArray &data);
+ bool compileProperty(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QV4::CompiledData::Binding *binding, QList<ListInstruction> &instr, QByteArray &data);
bool definesEmptyList(const QString &);