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
void setSingletonPragmaFound (bool found)
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 19 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 34 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 701 of file qmlvisitor.cpp.

◆ endVisit() [2/8]

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

Definition at line 580 of file qmlvisitor.cpp.

◆ endVisit() [3/8]

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

Definition at line 559 of file qmlvisitor.cpp.

◆ endVisit() [4/8]

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

Definition at line 570 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 534 of file qmlvisitor.cpp.

◆ endVisit() [6/8]

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

End the visit of the member.

Definition at line 655 of file qmlvisitor.cpp.

◆ endVisit() [7/8]

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

Definition at line 730 of file qmlvisitor.cpp.

◆ endVisit() [8/8]

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

Definition at line 720 of file qmlvisitor.cpp.

◆ hasError()

bool QmlDocVisitor::hasError ( ) const
nodiscard

Definition at line 740 of file qmlvisitor.cpp.

Referenced by QmlCodeParser::parseSourceFile().

Here is the caller graph for this function:

◆ setSingletonPragmaFound()

void QmlDocVisitor::setSingletonPragmaFound ( bool found)
inline

Definition at line 54 of file qmlvisitor.h.

◆ throwRecursionDepthError()

void QmlDocVisitor::throwRecursionDepthError ( )
finalvirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 735 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 669 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 660 of file qmlvisitor.cpp.

◆ visit() [3/9]

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

Definition at line 575 of file qmlvisitor.cpp.

◆ visit() [4/9]

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

Definition at line 542 of file qmlvisitor.cpp.

◆ visit() [5/9]

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

Definition at line 564 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 509 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 601 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 725 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 715 of file qmlvisitor.cpp.


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