diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-15 17:29:04 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 15:10:00 +0100 |
commit | ae0a2ea25714af603babe5aa0de364d1ebae1170 (patch) | |
tree | 91a0845dd397af79b30341aae64f6c24f0f43197 /src/qml/qml/qqmlcustomparser.cpp | |
parent | f8176d72ac491469ccf0288cbb86c0ccc12fb47b (diff) |
[new compiler] Add support for QML list models
List model definitions make heavy use of custom parsers, which requires AST
access as well as a general port to the new QQmlCustomParser API.
Additional fixes in the custom parser support were needed to pass all tests:
* Fix support for AcceptsSignalHandlers and AcceptsAttachedProperties
* Don't call setCustomData unless the compiler generated data earlier
Change-Id: Ic42f8a890391267c94f63d35f055b60fdbf3c83d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcustomparser.cpp')
-rw-r--r-- | src/qml/qml/qqmlcustomparser.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcustomparser.cpp b/src/qml/qml/qqmlcustomparser.cpp index ca23451774..90bd2fd875 100644 --- a/src/qml/qml/qqmlcustomparser.cpp +++ b/src/qml/qml/qqmlcustomparser.cpp @@ -230,13 +230,6 @@ void QQmlCustomParser::clearErrors() exceptions.clear(); } -QByteArray QQmlCustomParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) -{ - Q_UNUSED(qmlUnit) - Q_UNUSED(bindings) - return QByteArray(); -} - /*! Reports an error with the given \a description. @@ -349,6 +342,16 @@ QQmlBinding::Identifier QQmlCustomParser::bindingIdentifier(const QQmlScript::Va return compiler->bindingIdentifier(value, name, this); } +QQmlBinding::Identifier QQmlCustomParser::bindingIdentifier(const QV4::CompiledData::Binding *binding) +{ + return compiler->bindingIdentifier(binding, this); +} + +AST::Node *QQmlCustomParser::astForBinding(int scriptIndex) const +{ + return compiler->astForBinding(scriptIndex); +} + struct StaticQtMetaObject : public QObject { static const QMetaObject *get() |