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/qqmlcompiler.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/qqmlcompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 069345ecd3..a0c1bbcdda 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -2665,30 +2665,6 @@ bool QQmlCompiler::testQualifiedEnumAssignment(QQmlScript::Property *prop, return true; } -int QQmlCompiler::bindingIdentifier(const QString &name, const Variant &value, const BindingContext &ctxt) -{ - JSBindingReference *reference = pool->New<JSBindingReference>(); - reference->expression = value; - reference->property = pool->New<Property>(); - reference->property->setName(name); - reference->value = 0; - reference->bindingContext = ctxt; - reference->bindingContext.owner++; - // Unfortunately this is required for example for PropertyChanges where the bindings - // will be executed in the dynamic scope of the target, so we can't resolve any lookups - // at run-time. - reference->disableLookupAcceleration = true; - - const int id = output->customParserBindings.count(); - output->customParserBindings.append(0); // Filled in later. - reference->customParserBindingsIndex = id; - - compileState->totalBindingsCount++; - compileState->bindings.prepend(reference); - - return id; -} - QQmlBinding::Identifier QQmlCompiler::bindingIdentifier(const Variant &value, const QString &name, QQmlCustomParser *customParser) { JSBindingReference *reference = pool->New<JSBindingReference>(); |