diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-31 15:09:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-03 14:38:09 +0100 |
commit | 5c62a537065b0186bd07cc008a47405607b2ba92 (patch) | |
tree | f73a162fa1625c9da8ba8058c0afaef277a9ad0e /src/qml/compiler/qqmlcodegenerator_p.h | |
parent | 50df8d6aa5e37335d59eded621451a81ee2e0897 (diff) |
[new compiler] Fix error messages for binding vs. property declarations
Separate binding errors from property declaration errors - they were
accidentally mixed up.
Change-Id: Id2d5134dc98ee3e1d7ce0c3d356f165e144e0d82
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmlcodegenerator_p.h')
-rw-r--r-- | src/qml/compiler/qqmlcodegenerator_p.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h index c687444bb6..eae359418a 100644 --- a/src/qml/compiler/qqmlcodegenerator_p.h +++ b/src/qml/compiler/qqmlcodegenerator_p.h @@ -188,18 +188,19 @@ public: QString sanityCheckFunctionNames(const QList<CompiledFunctionOrExpression> &allFunctions, const QSet<QString> &illegalNames, AST::SourceLocation *errorLocation); QString appendSignal(Signal *signal); - bool appendProperty(QmlProperty *prop, bool isDefaultProperty); + QString appendProperty(QmlProperty *prop, const QString &propertyName, bool isDefaultProperty, const AST::SourceLocation &defaultToken, AST::SourceLocation *errorLocation); void appendFunction(Function *f); - void appendBinding(Binding *b) { bindings->append(b); } + QString appendBinding(Binding *b, bool isListBinding, bool bindToDefaultProperty); - QSet<int> propertyNames; private: PoolList<QmlProperty> *properties; PoolList<Signal> *qmlSignals; PoolList<Binding> *bindings; PoolList<Function> *functions; + QSet<int> propertyNames; + QSet<int> bindingNames; QSet<int> signalNames; }; @@ -287,8 +288,8 @@ public: void appendBinding(AST::UiQualifiedId *name, AST::Statement *value); void appendBinding(AST::UiQualifiedId *name, int objectIndex, bool isOnAssignment = false); - void appendBinding(const AST::SourceLocation &nameLocation, int propertyNameIndex, AST::Statement *value); - void appendBinding(const AST::SourceLocation &nameLocation, int propertyNameIndex, int objectIndex, bool isListItem = false, bool isOnAssignment = false); + void appendBinding(const AST::SourceLocation &nameLocation, quint32 propertyNameIndex, AST::Statement *value); + void appendBinding(const AST::SourceLocation &nameLocation, quint32 propertyNameIndex, int objectIndex, bool isListItem = false, bool isOnAssignment = false); QmlObject *bindingsTarget() const; @@ -298,8 +299,6 @@ public: // with the object any right-hand-side of a binding should apply to. bool resolveQualifiedId(AST::UiQualifiedId **nameToResolve, QmlObject **object); - bool sanityCheckPropertyName(const AST::SourceLocation &nameLocation, int nameIndex, bool isListItemOnOrAssignment = false); - void recordError(const AST::SourceLocation &location, const QString &description); void collectTypeReferences(); |