diff options
-rw-r--r-- | src/tools/qdoc/qmlvisitor.cpp | 32 | ||||
-rw-r--r-- | src/tools/qdoc/qmlvisitor.h | 5 |
2 files changed, 33 insertions, 4 deletions
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 8b6f81de3e..058ab9a725 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -424,8 +424,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition) */ void QmlDocVisitor::endVisit(QQmlJS::AST::UiObjectDefinition *definition) { - if (nestingLevel > 0) + if (nestingLevel > 0) { --nestingLevel; + } lastEndOffset = definition->lastSourceLocation().end(); } @@ -461,6 +462,26 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::UiImportList *definition) lastEndOffset = definition->lastSourceLocation().end(); } +bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectBinding *) +{ + ++nestingLevel; + return true; +} + +void QmlDocVisitor::endVisit(QQmlJS::AST::UiObjectBinding *) +{ + --nestingLevel; +} + +bool QmlDocVisitor::visit(QQmlJS::AST::UiArrayBinding *) +{ + return true; +} + +void QmlDocVisitor::endVisit(QQmlJS::AST::UiArrayBinding *) +{ +} + /*! Visits the public \a member declaration, which can be a signal or a property. It is a custom signal or property. @@ -468,8 +489,9 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::UiImportList *definition) */ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member) { - if (nestingLevel > 1) + if (nestingLevel > 1) { return true; + } switch (member->type) { case QQmlJS::AST::UiPublicMember::Signal: { @@ -535,8 +557,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::IdentifierPropertyName *) */ bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration* fd) { - if (nestingLevel > 1) + if (nestingLevel > 1) { return true; + } if (current->type() == Node::Document) { QmlClassNode* qmlClass = static_cast<QmlClassNode*>(current); if (qmlClass) { @@ -581,8 +604,9 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::FunctionDeclaration* fd) */ bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* sb) { - if (nestingLevel > 1) + if (nestingLevel > 1) { return true; + } if (current->type() == Node::Document) { QString handler = sb->qualifiedId->name.toString(); if (handler.length() > 2 && handler.startsWith("on") && handler.at(2).isUpper()) { diff --git a/src/tools/qdoc/qmlvisitor.h b/src/tools/qdoc/qmlvisitor.h index bfec61eb34..cc00ccbe6c 100644 --- a/src/tools/qdoc/qmlvisitor.h +++ b/src/tools/qdoc/qmlvisitor.h @@ -85,6 +85,11 @@ public: bool visit(QQmlJS::AST::UiPublicMember *member); void endVisit(QQmlJS::AST::UiPublicMember *definition); + virtual bool visit(QQmlJS::AST::UiObjectBinding *); + virtual void endVisit(QQmlJS::AST::UiObjectBinding *); + virtual void endVisit(QQmlJS::AST::UiArrayBinding *); + virtual bool visit(QQmlJS::AST::UiArrayBinding *); + bool visit(QQmlJS::AST::IdentifierPropertyName *idproperty); bool visit(QQmlJS::AST::FunctionDeclaration *); |