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
QmlCodeParser Class Reference

#include <qmlcodeparser.h>

+ Inheritance diagram for QmlCodeParser:
+ Collaboration diagram for QmlCodeParser:

Public Member Functions

 QmlCodeParser ()=default
 
 ~QmlCodeParser () override=default
 
void initializeParser () override
 
void terminateParser () override
 Terminating a code parser is trivial.
 
QString language () override
 Returns "QML".
 
QStringList sourceFileNameFilter () override
 Returns a string list containing "*.qml".
 
void parseSourceFile (const Location &location, const QString &filePath, CppCodeParser &) override
 Parses the source file at filePath and inserts the contents into the database.
 
void extractPragmas (QString &script)
 Copy & paste from src/declarative/qml/qdeclarativescriptparser.cpp, then modified to return no values.
 
- Public Member Functions inherited from CodeParser
 CodeParser ()
 The constructor adds this code parser to the static list of code parsers.
 
virtual ~CodeParser ()
 The destructor removes this code parser from the static list of code parsers.
 

Additional Inherited Members

- Static Public Member Functions inherited from CodeParser
static void initialize ()
 All the code parsers in the static list are initialized here, after the qdoc configuration variables have been set.
 
static void terminate ()
 All the code parsers in the static list are terminated here.
 
static CodeParserparserForLanguage (const QString &language)
 
static CodeParserparserForSourceFile (const QString &filePath)
 
static void setLink (Node *node, Node::LinkType linkType, const QString &arg)
 
static bool isWorthWarningAbout (const Doc &doc)
 Test for whether a doc comment warrants warnings.
 
- Static Public Attributes inherited from CodeParser
static const QSet< QStringcommon_meta_commands
 
- Static Protected Member Functions inherited from CodeParser
static void extractPageLinkAndDesc (QStringView arg, QString *link, QString *desc)
 
- Protected Attributes inherited from CodeParser
QDocDatabasem_qdb {}
 

Detailed Description

Definition at line 20 of file qmlcodeparser.h.

Constructor & Destructor Documentation

◆ QmlCodeParser()

QmlCodeParser::QmlCodeParser ( )
default

◆ ~QmlCodeParser()

QmlCodeParser::~QmlCodeParser ( )
overridedefault

Member Function Documentation

◆ extractPragmas()

void QmlCodeParser::extractPragmas ( QString & script)

Copy & paste from src/declarative/qml/qdeclarativescriptparser.cpp, then modified to return no values.

Searches for ".pragma <value>" declarations within script. Currently supported pragmas are: library

Definition at line 102 of file qmlcodeparser.cpp.

References replaceWithSpace().

Referenced by parseSourceFile().

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

◆ initializeParser()

void QmlCodeParser::initializeParser ( )
inlineoverridevirtual

Implements CodeParser.

Definition at line 26 of file qmlcodeparser.h.

◆ language()

QT_BEGIN_NAMESPACE QString QmlCodeParser::language ( )
overridevirtual

Returns "QML".

Implements CodeParser.

Definition at line 19 of file qmlcodeparser.cpp.

◆ parseSourceFile()

void QmlCodeParser::parseSourceFile ( const Location & location,
const QString & filePath,
CppCodeParser &  )
overridevirtual

Parses the source file at filePath and inserts the contents into the database.

The location is used for error reporting.

If it can't open the file at filePath, it reports an error and returns without doing anything.

Implements CodeParser.

Definition at line 40 of file qmlcodeparser.cpp.

References extractPragmas(), and QmlDocVisitor::hasError().

+ Here is the call graph for this function:

◆ sourceFileNameFilter()

QStringList QmlCodeParser::sourceFileNameFilter ( )
overridevirtual

Returns a string list containing "*.qml".

This is the only file type parsed by the QMLN parser.

Implements CodeParser.

Definition at line 28 of file qmlcodeparser.cpp.

◆ terminateParser()

void QmlCodeParser::terminateParser ( )
inlineoverridevirtual

Terminating a code parser is trivial.

Reimplemented from CodeParser.

Definition at line 27 of file qmlcodeparser.h.


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