Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QmlDocVisitor Class Reference

#include <qmlvisitor.h>

+ Inheritance diagram for QmlDocVisitor:
+ Collaboration diagram for QmlDocVisitor:

Public Member Functions

 QmlDocVisitor (const QString &filePath, const QString &code, QQmlJS::Engine *engine, const QSet< QString > &commands, const QSet< QString > &topics)
 The constructor stores all the parameters in local data members.
 
 ~QmlDocVisitor () override=default
 
bool visit (QQmlJS::AST::UiImport *import) override
 
void endVisit (QQmlJS::AST::UiImport *definition) override
 
bool visit (QQmlJS::AST::UiObjectDefinition *definition) override
 Begin the visit of the object definition, recording it in the qdoc database.
 
void endVisit (QQmlJS::AST::UiObjectDefinition *definition) override
 End the visit of the object definition.
 
bool visit (QQmlJS::AST::UiPublicMember *member) override
 Visits the public member declaration, which can be a signal or a property.
 
void endVisit (QQmlJS::AST::UiPublicMember *definition) override
 End the visit of the member.
 
bool visit (QQmlJS::AST::UiObjectBinding *) override
 
void endVisit (QQmlJS::AST::UiObjectBinding *) override
 
void endVisit (QQmlJS::AST::UiArrayBinding *) override
 
bool visit (QQmlJS::AST::UiArrayBinding *) override
 
bool visit (QQmlJS::AST::IdentifierPropertyName *idproperty) override
 
bool visit (QQmlJS::AST::FunctionDeclaration *) override
 Begin the visit of the function declaration fd, but only if the nesting level is 1.
 
void endVisit (QQmlJS::AST::FunctionDeclaration *) override
 End the visit of the function declaration, fd.
 
bool visit (QQmlJS::AST::UiScriptBinding *) override
 Begin the visit of the signal handler declaration sb, but only if the nesting level is 1.
 
void endVisit (QQmlJS::AST::UiScriptBinding *) override
 
bool visit (QQmlJS::AST::UiQualifiedId *) override
 
void endVisit (QQmlJS::AST::UiQualifiedId *) override
 
void throwRecursionDepthError () final
 
bool hasError () const
 
- Public Member Functions inherited from QQmlJS::AST::Visitor
 Visitor (quint16 parentRecursionDepth=0)
 
bool preVisit (Node *) override
 
void postVisit (Node *) override
 
- Public Member Functions inherited from QQmlJS::AST::BaseVisitor
 BaseVisitor (quint16 parentRecursionDepth=0)
 
virtual ~BaseVisitor ()
 
quint16 recursionDepth () const
 

Additional Inherited Members

- Protected Attributes inherited from QQmlJS::AST::BaseVisitor
quint16 m_recursionDepth = 0
 

Detailed Description

Definition at line 35 of file qmlvisitor.h.

Constructor & Destructor Documentation

◆ QmlDocVisitor()

QmlDocVisitor::QmlDocVisitor ( const QString & filePath,
const QString & code,
QQmlJS::Engine * engine,
const QSet< QString > & commands,
const QSet< QString > & topics )

The constructor stores all the parameters in local data members.

Definition at line 30 of file qmlvisitor.cpp.

References QmlDocVisitor(), QDocDatabase::primaryTreeRoot(), and QDocDatabase::qdocDB().

Referenced by QmlDocVisitor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~QmlDocVisitor()

QmlDocVisitor::~QmlDocVisitor ( )
overridedefault

Member Function Documentation

◆ endVisit() [1/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::FunctionDeclaration * fd)
override

End the visit of the function declaration, fd.

Definition at line 685 of file qmlvisitor.cpp.

◆ endVisit() [2/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiArrayBinding * )
override

Definition at line 565 of file qmlvisitor.cpp.

◆ endVisit() [3/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiImport * definition)
override

Definition at line 544 of file qmlvisitor.cpp.

◆ endVisit() [4/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiObjectBinding * )
override

Definition at line 555 of file qmlvisitor.cpp.

◆ endVisit() [5/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiObjectDefinition * definition)
override

End the visit of the object definition.

In particular, decrement the object nesting level, which is used to test whether we are at the public API level. The public API level is level 1. It won't decrement below 0.

Definition at line 519 of file qmlvisitor.cpp.

◆ endVisit() [6/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiPublicMember * definition)
override

End the visit of the member.

Definition at line 639 of file qmlvisitor.cpp.

◆ endVisit() [7/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiQualifiedId * )
override

Definition at line 714 of file qmlvisitor.cpp.

◆ endVisit() [8/8]

void QmlDocVisitor::endVisit ( QQmlJS::AST::UiScriptBinding * sb)
override

Definition at line 704 of file qmlvisitor.cpp.

◆ hasError()

bool QmlDocVisitor::hasError ( ) const
nodiscard

Definition at line 724 of file qmlvisitor.cpp.

Referenced by QmlCodeParser::parseSourceFile().

+ Here is the caller graph for this function:

◆ throwRecursionDepthError()

void QmlDocVisitor::throwRecursionDepthError ( )
finalvirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 719 of file qmlvisitor.cpp.

◆ visit() [1/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::FunctionDeclaration * fd)
override

Begin the visit of the function declaration fd, but only if the nesting level is 1.

Definition at line 653 of file qmlvisitor.cpp.

References Node< _Tp >::isQmlType(), and FunctionNode::QmlMethod.

+ Here is the call graph for this function:

◆ visit() [2/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::IdentifierPropertyName * idproperty)
override

Definition at line 644 of file qmlvisitor.cpp.

◆ visit() [3/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiArrayBinding * )
override

Definition at line 560 of file qmlvisitor.cpp.

◆ visit() [4/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiImport * import)
override

Definition at line 527 of file qmlvisitor.cpp.

◆ visit() [5/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiObjectBinding * )
override

Definition at line 549 of file qmlvisitor.cpp.

◆ visit() [6/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiObjectDefinition * definition)
override

Begin the visit of the object definition, recording it in the qdoc database.

Increment the object nesting level, which is used to test whether we are at the public API level. The public level is level 1.

Defers the construction of a QmlTypeNode instance to applyDocumentation(), by passing nullptr as the second argument.

Definition at line 494 of file qmlvisitor.cpp.

References Node< _Tp >::isNamespace().

+ Here is the call graph for this function:

◆ visit() [7/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiPublicMember * member)
override

Visits the public member declaration, which can be a signal or a property.

It is a custom signal or property. Only visit the member if the nestingLevel is 1.

Definition at line 586 of file qmlvisitor.cpp.

References Node< _Tp >::isQmlType(), QmlPropertyNode::markDefault(), QmlPropertyNode::markReadOnly(), FunctionNode::QmlSignal, and QmlPropertyNode::setRequired().

+ Here is the call graph for this function:

◆ visit() [8/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiQualifiedId * )
override

Definition at line 709 of file qmlvisitor.cpp.

◆ visit() [9/9]

bool QmlDocVisitor::visit ( QQmlJS::AST::UiScriptBinding * )
override

Begin the visit of the signal handler declaration sb, but only if the nesting level is 1.

This visit is now deprecated. It has been decided to document public signals. If a signal handler must be discussed in the documentation, that discussion must take place in the comment for the signal.

Definition at line 699 of file qmlvisitor.cpp.


The documentation for this class was generated from the following files: