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
sourcefileparser.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#pragma once
5
8
9#include <variant>
10
11#include <QString>
12#include <QFileInfo>
13
14struct CppSourceFile {};
17struct JsSourceFile {};
19
21using TaggedSourceFile = std::pair<QString, SourceFileTag>;
22
23inline TaggedSourceFile tag_source_file(const QString& path) {
24 static QStringList cpp_file_extensions{
25 "c++", "cc", "cpp", "cxx", "mm"
26 };
27 static QStringList cpp_header_extensions{ "h", "h++", "hpp", "hxx" };
28 static QStringList qdoc_file_extensions{ "qdoc" };
29 static QStringList javascript_file_extensions{ "js" };
30
31 QString extension{QFileInfo(path).suffix()};
32
33 const bool inHeaders = Config::instance().get(CONFIG_DOCUMENTATIONINHEADERS).asBool();
34
35 if (inHeaders && cpp_header_extensions.contains(extension)) {
36 return TaggedSourceFile{ path, CppHeaderSourceFile{} };
37 } else if (cpp_file_extensions.contains(extension)) {
38 return TaggedSourceFile{ path, CppSourceFile{} };
39 } else if (qdoc_file_extensions.contains(extension))
40 return TaggedSourceFile{ path, QDocSourceFile{} };
41 else if (javascript_file_extensions.contains(extension)) return TaggedSourceFile{path, JsSourceFile{}};
42
43 return TaggedSourceFile{path, UnknownSourceFile{}};
44}
45
47public:
52
53public:
54 SourceFileParser(ClangCodeParser& clang_parser, PureDocParser& pure_parser)
55 : cpp_file_parser(clang_parser),
56 pure_file_parser(pure_parser)
57 {}
58
59 ParseResult operator()(const TaggedSourceFile& source) {
60 if (std::holds_alternative<CppSourceFile>(source.second))
61 return (*this)(source.first, std::get<CppSourceFile>(source.second));
62 else if (std::holds_alternative<CppHeaderSourceFile>(source.second))
63 return (*this)(source.first, std::get<CppHeaderSourceFile>(source.second));
64 else if (std::holds_alternative<QDocSourceFile>(source.second))
65 return (*this)(source.first, std::get<QDocSourceFile>(source.second));
66 else if (std::holds_alternative<JsSourceFile>(source.second))
67 return (*this)(source.first, std::get<JsSourceFile>(source.second));
68 else if (std::holds_alternative<UnknownSourceFile>(source.second))
69 return {{}, {}};
70
71 Q_UNREACHABLE();
72 }
73
74private:
75 ParseResult operator()(const QString& path, CppSourceFile) {
76 auto [untied, tied] = cpp_file_parser.parse_cpp_file(path);
77
78 return {untied, tied};
79 }
80 ParseResult operator()(const QString& path, CppHeaderSourceFile) {
81 return (*this)(path, CppSourceFile{});
82 }
83
84 ParseResult operator()(const QString& path, QDocSourceFile) {
85 return {pure_file_parser.parse_qdoc_file(path), {}};
86 }
87
88 ParseResult operator()(const QString& path, JsSourceFile) {
89 return {pure_file_parser.parse_qdoc_file(path), {}};
90 }
91
92private:
93 ClangCodeParser& cpp_file_parser;
94 PureDocParser& pure_file_parser;
95};
int main(int argc, char *argv[])
[2]
Definition buffer.cpp:77
std::optional< PCHFile > buildPCH(QDocDatabase *qdb, QString module_header, const std::set< Config::HeaderFilePath > &all_headers, const std::vector< QByteArray > &include_paths, const QList< QByteArray > &defines)
Building the PCH must be possible when there are no .cpp files, so it is moved here to its own member...
struct CXTranslationUnitImpl * CXTranslationUnit
void appendToRelatedByProxy(const NodeList &t)
Appends the list of node pointers to the list of elements that are related to this Aggregate but are ...
Definition aggregate.h:69
qsizetype count() const
Returns the number of children in the child list.
Definition aggregate.h:40
void resolveRelates()
Adopts each non-aggregate C++ node (function/macro, typedef, enum, variable, or a shared comment node...
void adoptChild(Node *child)
This Aggregate becomes the adoptive parent of child.
QString typeWord(bool cap) const
Returns a word representing the kind of Aggregate this node is.
void resolveQmlInheritance()
Resolves the inheritance information for all QML type children of this aggregate.
virtual QmlTypeNode * qmlBaseNode() const
If this Aggregate is a QmlTypeNode, this function returns a pointer to the QmlTypeNode that is its ba...
Definition aggregate.h:54
bool hasOverloads(const FunctionNode *fn) const
Returns true if this aggregate has multiple function overloads matching the name of fn.
NodeList::ConstIterator constBegin() const
Returns a const iterator pointing at the beginning of the child list.
Definition aggregate.h:43
void findAllObsoleteThings()
Finds all the obsolete C++ classes and QML types in this aggregate and all the C++ classes and QML ty...
~Aggregate() override
Destroys this Aggregate; deletes each child.
Definition aggregate.cpp:51
bool hasObsoleteMembers() const
Returns true if this aggregate contains at least one child that is marked obsolete.
FunctionMap & functionMap()
Returns a reference to this Aggregate's function map, which is a map of all the children of this Aggr...
Definition aggregate.h:59
void findAllSince()
Finds all the nodes in this node where a {since} command appeared in the qdoc comment and sorts them ...
NodeList m_children
Definition aggregate.h:83
void normalizeOverloads()
Sorts the lists of overloads in the function map and assigns overload numbers.
NodeList & relatedByProxy()
Returns a reference to a list of node pointers where each element points to a node in an index file f...
Definition aggregate.h:70
void findAllFunctions(NodeMapMap &functionIndex)
Insert all functions declared in this aggregate into the functionIndex.
void findAllNamespaces(NodeMultiMap &namespaces)
For each child of this node, if the child is a namespace node, insert the child into the namespaces m...
void markUndocumentedChildrenInternal()
Mark all child nodes that have no documentation as having private access and internal status.
bool isAggregate() const override
Returns true because this node is an instance of Aggregate, which means it can have children.
Definition aggregate.h:37
void addChild(Node *child)
Adds the child to this node's child list and sets the child's parent pointer to this Aggregate.
NodeList m_relatedByProxy
Definition aggregate.h:84
FunctionMap m_functionMap
Definition aggregate.h:85
FunctionNode * findFunctionChild(const FunctionNode *clone)
Returns the function node that is a child of this node, such that the function described has the same...
const NodeList & nonfunctionList()
Returns a const reference to the list of child nodes of this aggregate that are not function nodes.
const NodeList & childNodes() const
Returns a const reference to the child list.
Definition aggregate.h:41
NodeList::ConstIterator constEnd() const
Returns a const iterator pointing at the end of the child list.
Definition aggregate.h:44
const std::optional< QString > & includeFile() const
Definition aggregate.h:50
void findAllClasses()
Finds all the C++ classes, QML types, QML basic types, and examples in this aggregate and inserts the...
void findAllAttributions(NodeMultiMap &attributions)
Find all the attribution pages in this node and insert them into attributions.
The Atom class is the fundamental unit for representing documents internally.
Definition atom.h:18
AtomType type() const
Return the type of this atom.
Definition atom.h:149
virtual Node::Genus genus()
Definition atom.h:158
void setNext(Atom *newNext)
Definition atom.h:142
AtomType
\value AnnotatedList \value AutoLink \value BaseName \value BriefLeft \value BriefRight \value C \val...
Definition atom.h:20
@ CaptionLeft
Definition atom.h:28
@ ListTagLeft
Definition atom.h:64
@ TableRight
Definition atom.h:94
@ DivRight
Definition atom.h:39
@ GeneratedList
Definition atom.h:49
@ BriefRight
Definition atom.h:26
@ CodeQuoteArgument
Definition atom.h:32
@ WarningLeft
Definition atom.h:104
@ SinceList
Definition atom.h:86
@ SidebarLeft
Definition atom.h:84
@ Keyword
Definition atom.h:56
@ TableHeaderRight
Definition atom.h:96
@ FormatElse
Definition atom.h:44
@ InlineImage
Definition atom.h:55
@ TableRowRight
Definition atom.h:98
@ FootnoteRight
Definition atom.h:43
@ LineBreak
Definition atom.h:59
@ SnippetCommand
Definition atom.h:89
@ TableRowLeft
Definition atom.h:97
@ Nop
Definition atom.h:71
@ WarningRight
Definition atom.h:105
@ LegaleseRight
Definition atom.h:58
@ ListTagRight
Definition atom.h:65
@ CaptionRight
Definition atom.h:29
@ NavLink
Definition atom.h:70
@ ListItemNumber
Definition atom.h:63
@ SinceTagRight
Definition atom.h:88
@ DetailsLeft
Definition atom.h:36
@ CodeBad
Definition atom.h:31
@ RawString
Definition atom.h:79
@ Target
Definition atom.h:102
@ AnnotatedList
Definition atom.h:21
@ SectionRight
Definition atom.h:81
@ SectionHeadingLeft
Definition atom.h:82
@ TableLeft
Definition atom.h:93
@ ListItemRight
Definition atom.h:67
@ Image
Definition atom.h:51
@ TableItemRight
Definition atom.h:100
@ ListItemLeft
Definition atom.h:66
@ ImportantRight
Definition atom.h:54
@ Code
Definition atom.h:30
@ String
Definition atom.h:92
@ ListLeft
Definition atom.h:62
@ NavAutoLink
Definition atom.h:69
@ CodeQuoteCommand
Definition atom.h:33
@ BriefLeft
Definition atom.h:25
@ ImageText
Definition atom.h:52
@ ExampleFileLink
Definition atom.h:40
@ LegaleseLeft
Definition atom.h:57
@ ListRight
Definition atom.h:68
@ C
Definition atom.h:27
@ ParaRight
Definition atom.h:75
@ Last
Definition atom.h:107
@ Qml
Definition atom.h:76
@ FormattingLeft
Definition atom.h:47
@ FormattingRight
Definition atom.h:48
@ SectionHeadingRight
Definition atom.h:83
@ Link
Definition atom.h:60
@ ImportantLeft
Definition atom.h:53
@ FormatEndif
Definition atom.h:45
@ UnhandledFormat
Definition atom.h:103
@ SinceTagLeft
Definition atom.h:87
@ ExampleImageLink
Definition atom.h:41
@ BR
Definition atom.h:24
@ DetailsRight
Definition atom.h:37
@ FootnoteLeft
Definition atom.h:42
@ AutoLink
Definition atom.h:22
@ SnippetLocation
Definition atom.h:91
@ TableHeaderLeft
Definition atom.h:95
@ ComparesRight
Definition atom.h:35
@ QuotationLeft
Definition atom.h:77
@ SectionLeft
Definition atom.h:80
@ LinkNode
Definition atom.h:61
@ HR
Definition atom.h:50
@ DivLeft
Definition atom.h:38
@ TableItemLeft
Definition atom.h:99
@ NoteRight
Definition atom.h:73
@ QuotationRight
Definition atom.h:78
@ ParaLeft
Definition atom.h:74
@ BaseName
Definition atom.h:23
@ TableOfContents
Definition atom.h:101
@ ComparesLeft
Definition atom.h:34
@ FormatIf
Definition atom.h:46
@ SnippetIdentifier
Definition atom.h:90
@ NoteLeft
Definition atom.h:72
@ SidebarRight
Definition atom.h:85
@ UnknownCommand
Definition atom.h:106
virtual bool isLinkAtom() const
Definition atom.h:157
Atom * m_next
Definition atom.h:163
QStringList m_strs
Definition atom.h:165
const QString & string() const
Returns the string parameter that together with the type characterizes this atom.
Definition atom.h:151
QString linkText() const
For a link atom, returns the string representing the link text if one exist in the list of atoms.
Definition atom.cpp:353
Atom * next()
Return the next atom in the atom list.
Definition atom.h:141
qsizetype count() const
Definition atom.h:153
const Atom * next() const
Return the next atom in the atom list.
Definition atom.h:146
void chopString()
\also string()
Definition atom.h:139
const QString & string(int i) const
Definition atom.h:152
const Atom * next(AtomType t) const
Return the next Atom in the list if it is of AtomType t.
Definition atom.cpp:289
const Atom * find(AtomType t) const
Starting from this Atom, searches the linked list for the atom of specified type t and returns it.
Definition atom.cpp:259
const QStringList & strings() const
Definition atom.h:155
virtual ~Atom()=default
QString typeString() const
Return the type of this atom as a string.
Definition atom.cpp:321
void appendChar(QChar ch)
Appends ch to the string parameter of this atom.
Definition atom.h:136
virtual Tree * domain()
Definition atom.h:159
virtual void resolveSquareBracketParams()
Definition atom.h:160
AtomType m_type
Definition atom.h:164
ParsedCppFileIR parse_cpp_file(const QString &filePath)
Get ready to parse the C++ cpp file identified by filePath and add its parsed contents to the databas...
ClangCodeParser(QDocDatabase *qdb, Config &, const std::vector< QByteArray > &include_paths, const QList< QByteArray > &defines, std::optional< std::reference_wrapper< const PCHFile > > pch)
The ClassNode represents a C++ class.
Definition classnode.h:21
virtual QString markedUpQmlItem(const Node *, bool)
Definition codemarker.h:34
static QString extraSynopsis(const Node *node, Section::Style style)
Returns the 'extra' synopsis string for node with status information, using a specified section style...
virtual QString markedUpSynopsis(const Node *, const Node *, Section::Style)
Definition codemarker.h:29
CodeMarker()
When a code marker constructs itself, it puts itself into the static list of code markers.
virtual void initializeMarker()
A code market performs no initialization by default.
static void initialize()
All the code markers in the static list are initialized here, after the qdoc configuration file has b...
QString taggedQmlNode(const Node *node)
virtual ~CodeMarker()
When a code marker destroys itself, it removes itself from the static list of code markers.
virtual void terminateMarker()
Terminating a code marker is trivial.
static void terminate()
All the code markers in the static list are terminated here.
virtual Atom::AtomType atomType() const
Definition codemarker.h:23
static QString stringForNode(const Node *node)
virtual QString markedUpName(const Node *)
Definition codemarker.h:35
QString taggedNode(const Node *node)
static const QSet< QString > common_meta_commands
Definition codeparser.h:108
virtual void initializeParser()=0
virtual void terminateParser()
Terminating a code parser is trivial.
CodeParser()
The constructor adds this code parser to the static list of code parsers.
static void setLink(Node *node, Node::LinkType linkType, const QString &arg)
virtual QString language()=0
virtual void parseSourceFile(const Location &location, const QString &filePath, CppCodeParser &cpp_code_parser)=0
QDocDatabase * m_qdb
Definition codeparser.h:137
static CodeParser * parserForLanguage(const QString &language)
static CodeParser * parserForSourceFile(const QString &filePath)
static bool isWorthWarningAbout(const Doc &doc)
Test for whether a doc comment warrants warnings.
virtual QStringList sourceFileNameFilter()=0
virtual ~CodeParser()
The destructor removes this code parser from the static list of code parsers.
static void extractPageLinkAndDesc(QStringView arg, QString *link, QString *desc)
static void initialize()
All the code parsers in the static list are initialized here, after the qdoc configuration variables ...
static void terminate()
All the code parsers in the static list are terminated here.
A class for holding the members of a collection of doc pages.
contains all the information for a single config variable in a .qdocconf file.
Definition config.h:42
ConfigVar()=default
const Location & location() const
Definition config.h:54
QStringList asStringList() const
Returns this config variable as a string list.
Definition config.cpp:244
int asInt() const
Returns this configuration variable as an integer; iterates through the string list,...
Definition config.cpp:277
bool asBool() const
Returns this config variable as a boolean.
Definition config.cpp:264
QSet< QString > asStringSet() const
Returns this config variable as a string set.
Definition config.cpp:255
The Config class contains the configuration variables for controlling how qdoc produces documentation...
Definition config.h:84
QStringList & includePaths()
Definition config.h:173
static QString installDir
Definition config.h:165
std::set< HeaderFilePath > getHeaderFiles()
Definition config.cpp:1421
static bool generateExamples
Definition config.h:164
const QString & programName() const
Definition config.h:120
static const QString dot
Definition config.h:162
QStringList & indexDirs()
Definition config.h:174
void reset()
Resets the Config instance - used by load()
Definition config.cpp:363
bool getAtomsDump() const
Definition config.h:109
void clear()
Clears the location and internal maps for config variables.
Definition config.cpp:352
~Config()
Definition config.cpp:344
bool singleExec() const
Definition config.h:404
void showHelp(int exitCode=0)
Definition config.h:118
QString currentDir() const
Definition config.h:175
PathFlags
Flags used for retrieving canonicalized paths from Config.
Definition config.h:90
@ None
Definition config.h:91
@ Validate
Definition config.h:103
@ IncludePaths
Definition config.h:104
const Location & location() const
Definition config.h:121
const ExcludedPaths & getExcludedPaths()
Definition config.cpp:1406
bool dualExec() const
Definition config.h:409
bool preparing() const
Definition config.h:181
QSet< QString > getOutputFormats() const
Function to return the correct outputformats.
Definition config.cpp:577
static void popWorkingDir()
Pop the top entry from the stack of working directories.
Definition config.cpp:1398
QDocPass
Definition config.h:88
@ Generate
Definition config.h:88
@ Neither
Definition config.h:88
@ Prepare
Definition config.h:88
bool generating() const
Definition config.h:182
static QSet< QString > overrideOutputFormats
Definition config.h:167
bool getDebug() const
Definition config.h:108
static QString overrideOutputDir
Definition config.h:166
QStringList & defines()
Definition config.h:171
QStringList & dependModules()
Definition config.h:172
void setQDocPass(const QDocPass &pass)
Definition config.h:180
bool showInternal() const
Definition config.h:110
QStringList getExampleImageFiles(const QSet< QString > &excludedDirs, const QSet< QString > &excludedFiles)
Definition config.cpp:789
QStringList qdocFiles() const
Definition config.h:119
QString previousCurrentDir() const
Definition config.h:177
QStringList getExampleQdocFiles(const QSet< QString > &excludedDirs, const QSet< QString > &excludedFiles)
Definition config.cpp:777
CppCodeMarker()=default
QString markedUpQmlItem(const Node *node, bool summary) override
QString markedUpName(const Node *node) override
Atom::AtomType atomType() const override
Returns the type of atom used to represent C++ code in the documentation.
QString markedUpSynopsis(const Node *node, const Node *relative, Section::Style style) override
~CppCodeMarker() override=default
static const QSet< QString > meta_commands
std::vector< TiedDocumentation > processQmlProperties(const UntiedDocumentation &untied)
bool splitQmlPropertyArg(const QString &arg, QString &type, QString &module, QString &element, QString &name, const Location &location)
A QML property argument has the form...
FunctionNode * parseOtherFuncArg(const QString &topic, const Location &location, const QString &funcArg)
Parse QML signal/method topic commands.
FunctionNode * parseMacroArg(const Location &location, const QString &macroArg)
Parse the macro arguments in macroArg ad hoc, without using any actual parser.
void processMetaCommand(const Doc &doc, const QString &command, const ArgPair &argLocPair, Node *node)
Process the metacommand command in the context of the node associated with the topic command and the ...
CppCodeParser(FnCommandParser &&parser)
static const QSet< QString > topic_commands
static bool isQMLMethodTopic(const QString &t)
returns true if t is {qmlsignal}, {qmlmethod}, {qmlattachedsignal}, or {qmlattachedmethod}...
void processMetaCommands(const std::vector< TiedDocumentation > &tied)
static bool isQMLPropertyTopic(const QString &t)
Returns true if t is {qmlproperty}, {qmlpropertygroup}, or {qmlattachedproperty}.
virtual Node * processTopicCommand(const Doc &doc, const QString &command, const ArgPair &arg)
Process the topic command found in the doc with argument arg.
void processMetaCommands(const Doc &doc, Node *node)
The topic command has been processed, and now doc and node are passed to this function to get the met...
void generatePageNode(PageNode *pn)
Generate the DocBook page for an entity that doesn't map to any underlying parsable C++ or QML elemen...
void generateQmlTypePage(QmlTypeNode *qcn)
Generate the DocBook page for a QML type.
void generateAlsoList(const Node *node) override
void generateQmlRequisites(const QmlTypeNode *qcn)
Lists the required imports and includes.
void initializeGenerator() override
Initializes the DocBook output generator's data structures from the configuration (Config).
void generateExampleFilePage(const Node *en, ResolvedFile resolved_file, CodeMarker *=nullptr) override
Generate a file with the contents of a C++ or QML source file.
bool generateText(const Text &text, const Node *relative) override
Generate the documentation for relative.
void generateCppReferencePage(Node *node)
Generate a reference page for the C++ class, namespace, or header file documented in node.
void generateSortedQmlNames(const Node *base, const QStringList &knownTypes, const NodeList &subs)
DocBookGenerator(FileResolver &file_resolver)
bool generateThreadSafeness(const Node *node)
Generates text that explains how threadsafe and/or reentrant node is.
void generateCollectionNode(CollectionNode *cn)
Generate the HTML page for a group, module, or QML module.
QString format() override
void generateDocBookSynopsis(const Node *node)
Generate the metadata for the given node in DocBook.
void generateGenericCollectionPage(CollectionNode *cn)
Generate the HTML page for a generic collection.
void generateBody(const Node *node)
Generate the body of the documentation from the qdoc comment found with the entity represented by the...
qsizetype generateAtom(const Atom *atom, const Node *relative, CodeMarker *) override
Generate DocBook from an instance of Atom.
void generateProxyPage(Aggregate *aggregate)
bool generateStatus(const Node *node)
void generateRequisites(const Aggregate *inner)
Lists the required imports and includes.
void generateSortedNames(const ClassNode *cn, const QList< RelatedClass > &rc)
void generateDocumentation(Node *node) override
Recursive writing of DocBook files from the root node.
void generateGroupReferenceText(const Node *node)
Return a string representing a text that exposes information about the groups that the node is part o...
void generateAddendum(const Node *node, Generator::Addendum type, CodeMarker *marker, bool generateNote) override
Generates an addendum note of type type for node.
QString fileExtension() const override
Returns "xml" for this subclass of Generator.
bool generateSince(const Node *node)
Definition doc.h:31
QSet< QString > parameterNames() const
Definition doc.cpp:195
Text legaleseText() const
Definition doc.cpp:187
QList< Text > alsoList() const
Definition doc.cpp:248
const Location & location() const
Returns the starting location of a qdoc comment.
Definition doc.cpp:90
Doc & operator=(const Doc &doc)
Definition doc.cpp:75
Doc(const Location &start_loc, const Location &end_loc, const QString &source, const QSet< QString > &metaCommandSet, const QSet< QString > &topics)
Parse the qdoc comment source.
Definition doc.cpp:47
const QList< Atom * > & tableOfContents() const
Definition doc.cpp:268
static void quoteFromFile(const Location &location, Quoter &quoter, ResolvedFile resolved_file)
Definition doc.cpp:403
bool isInternal() const
Returns true if the set of metacommands used in the doc comment contains {internal}...
Definition doc.cpp:219
bool hasTableOfContents() const
Definition doc.cpp:253
const QList< Atom * > & keywords() const
Definition doc.cpp:280
~Doc()
Definition doc.cpp:69
const Text & body() const
Definition doc.cpp:115
static void initialize(FileResolver &file_resolver)
Definition doc.cpp:308
bool hasKeywords() const
Definition doc.cpp:258
QStringList omitEnumItemNames() const
Definition doc.cpp:205
const QList< Atom * > & targets() const
Definition doc.cpp:286
QMultiMap< ComparisonCategory, Text > * comparesWithMap() const
Definition doc.cpp:297
const QList< int > & tableOfContentsLevels() const
Definition doc.cpp:274
bool hasTargets() const
Definition doc.cpp:263
Text trimmedBriefText(const QString &className) const
Definition doc.cpp:126
Sections
Definition doc.h:34
@ NoSection
Definition doc.h:35
@ Section3
Definition doc.h:38
@ Section1
Definition doc.h:36
@ Section2
Definition doc.h:37
@ Section4
Definition doc.h:39
ArgList metaCommandArgs(const QString &metaCommand) const
Definition doc.cpp:243
Text briefText(bool inclusive=false) const
Definition doc.cpp:121
const Location & startLocation() const
Returns the starting location of a qdoc comment.
Definition doc.cpp:99
Doc()=default
bool isMarkedReimp() const
Returns true if the set of metacommands used in the doc comment contains {reimp}.
Definition doc.cpp:228
static void trimCStyleComment(Location &location, QString &str)
Trims the deadwood out of str.
Definition doc.cpp:371
static void terminate()
All the heap allocated variables are deleted.
Definition doc.cpp:361
TopicList topicsUsed() const
Returns a reference to the list of topic commands used in the current qdoc comment.
Definition doc.cpp:238
QStringMultiMap * metaTagMap() const
Definition doc.cpp:292
QSet< QString > metaCommandsUsed() const
Definition doc.cpp:210
bool isEmpty() const
Definition doc.cpp:110
Doc(const Doc &doc)
Definition doc.cpp:64
void constructExtra() const
Definition doc.cpp:302
const QString & source() const
Definition doc.cpp:104
QStringList enumItemNames() const
Definition doc.cpp:200
void setImages(const QStringList &images)
Definition examplenode.h:29
const QString & projectFile() const
Definition examplenode.h:23
void appendImage(QString &image)
Definition examplenode.h:31
const QStringList & images() const
Definition examplenode.h:22
void setFiles(const QStringList &files, const QString &projectFile)
Definition examplenode.h:24
void setImageFileName(const QString &ifn) override
If this PageNode is an ExampleNode, the image file name data member is set to ifn.
Definition examplenode.h:20
ExampleNode(Aggregate *parent, const QString &name)
Definition examplenode.h:18
QString imageFileName() const override
If this PageNode is an ExampleNode, the image file name data member is returned.
Definition examplenode.h:19
void appendFile(QString &file)
Definition examplenode.h:30
const QStringList & files() const
Definition examplenode.h:21
Encapsulate the logic that QDoc uses to find files whose path is provided by the user and that are re...
std::optional< ResolvedFile > resolve(QString filename) const
Returns a ResolvedFile if query can be resolved or std::nullopt otherwise.
FileResolver(std::vector< DirectoryPath > &&search_directories)
Constructs an instance of FileResolver with the directories in search_directories as root directories...
const std::vector< DirectoryPath > & get_search_directories() const
Returns a const-reference to a collection of root search directories that this instance will use duri...
This node is used to represent any kind of function being documented.
bool isMacroWithParams() const
void setConst(bool b)
bool isMacroWithoutParams() const
bool isQmlMethod() const
QString metanessString() const
Returns a string representing the Metaness enum value for this function.
signed short overloadNumber() const
Returns the overload number for this function.
const QList< PropertyNode * > & associatedProperties() const
bool isPrivateSignal() const
bool isOverride() const
void setReimpFlag()
Sets the function node's reimp flag to true, which means the {\reimp} command was used in the qdoc co...
const QString & returnType() const
QString kindString() const
Returns a string representing the kind of function this Function node represents, which depends on th...
QString qmlTypeName() const override
If this is a QmlPropertyNode or a FunctionNode representing a QML method, this function returns the q...
void setStatic(bool b)
const Parameters & parameters() const
void setFinal(bool b)
bool isConstexpr() const
bool isRef() const
void setVirtualness(Virtualness virtualness)
const std::optional< QString > & declaredReturnType() const
bool isNonvirtual() const
QString logicalModuleIdentifier() const override
If this is a CollectionNode, this function returns the logical module identifier.
bool isMAssign() const
void setInvokable(bool b)
void setOverloadFlag()
bool isVirtual() const
bool isCAssign() const
const QString & overridesThis() const
bool isInvokable() const
bool isDefault() const override
Returns true if the QML property node is marked as default.
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
bool isDeprecated() const override
\reimp
bool hasOverloads() const
Returns true if this function has overloads.
bool isPureVirtual() const
const std::optional< QString > & getNoexcept() const
void setRef(bool b)
bool isCppFunction() const
bool returnsBool() const
bool isExplicit() const
bool isMarkedReimp() const override
Returns true if the FunctionNode is marked as a reimplemented function.
QString element() const override
If this node is a QmlPropertyNode or a FunctionNode, this function returns the name of the parent nod...
bool isDtor() const
void setOverride(bool b)
bool isSignal() const
void setRefRef(bool b)
bool isSpecialMemberFunction() const
QString signature(Node::SignatureOptions options) const override
Reconstructs and returns the function's signature.
bool isQmlSignal() const
bool isMacro() const override
returns true if either FunctionNode::isMacroWithParams() or FunctionNode::isMacroWithoutParams() retu...
bool isOverload() const
QString logicalModuleVersion() const override
If this is a CollectionNode, this function returns the logical module version number.
bool isConst() const
void markConstexpr()
const QString & tag() const
bool isRefRef() const
bool isAttached() const override
Returns true if the QML property or QML method node is marked as attached.
void setOverloadNumber(signed short number)
Sets the function node's overload number to number.
void markExplicit()
bool isStatic() const override
Returns true if the FunctionNode represents a static function.
bool isIgnored() const
In some cases, it is ok for a public function to be not documented.
bool isCCtor() const
bool isMCtor() const
friend int compare(const FunctionNode *f1, const FunctionNode *f2)
Compares FunctionNode f1 with f2, assumed to have identical names.
bool isFinal() const
bool isCtor() const
void setMetaness(Metaness metaness)
static Genus getGenus(Metaness metaness)
Determines the Genus value for this FunctionNode given the Metaness value metaness.
void setDefault(bool b)
QString returnTypeString() const
Returns the type of the function as a string.
bool isQmlSignalHandler() const
bool isSomeCtor() const
QString logicalModuleName() const override
If this is a CollectionNode, this function returns the logical module name.
Parameters & parameters()
bool hasAssociatedProperties() const
bool isSlot() const
const PropertyNode * primaryAssociatedProperty() const
Returns the primary associated property, if this is an access function for one or more properties.
QString virtualness() const
Returns this function's virtualness value as a string for use as an attribute value in index files.
Metaness metaness() const
static QString outputSuffix(const Node *node)
bool m_quoting
Definition generator.h:204
void signatureList(const NodeList &nodes, const Node *relative, CodeMarker *marker)
Generate a bullet list of function signatures.
void appendSignature(Text &text, const Node *node)
Append the signature for the function named in node to text, so that is a link to the documentation f...
virtual void generateCollectionNode(CollectionNode *, CodeMarker *)
Definition generator.h:89
virtual void generateProxyPage(Aggregate *, CodeMarker *)
Definition generator.h:86
virtual void generateCppReferencePage(Aggregate *, CodeMarker *)
Definition generator.h:85
bool generateComparisonCategory(const Node *node, CodeMarker *marker=nullptr)
QMap< QString, QString > & formattingRightMap()
virtual void generateAddendum(const Node *node, Addendum type, CodeMarker *marker, bool generateNote)
Generates an addendum note of type type for node, using marker as the code marker.
virtual QString typeString(const Node *node)
virtual void generateExampleFilePage(const Node *, ResolvedFile, CodeMarker *=nullptr)
Definition generator.h:80
static bool hasExceptions(const Node *node, NodeList &reentrant, NodeList &threadsafe, NodeList &nonreentrant)
void generateEnumValuesForQmlProperty(const Node *node, CodeMarker *marker)
FileResolver & file_resolver
Definition generator.h:195
static void setQmlTypeContext(QmlTypeNode *t)
Definition generator.h:69
virtual bool generateText(const Text &text, const Node *relative)
Definition generator.h:93
static const QString & outputDir()
Definition generator.h:60
virtual void generateAlsoList(const Node *node)
Definition generator.h:82
static QString getOverloadedSignalCode(const Node *node)
Returns the string containing an example code of the input node, if it is an overloaded signal.
virtual void initializeFormat()
Reads format-specific variables from config, sets output (sub)directories, creates them on the filesy...
static QString formatSince(const Node *node)
virtual void generateDocumentation(Node *node)
Recursive writing of HTML files from the root node.
static QString defaultModuleName()
Definition generator.h:66
static void initialize()
static QString trimmedTrailing(const QString &string, const QString &prefix, const QString &suffix)
Trims trailing whitespace off the string and returns the trimmed string.
virtual bool canHandleFormat(const QString &format)
Definition generator.h:46
const Atom * generateAtomList(const Atom *atom, const Node *relative, CodeMarker *marker, bool generate, int &numGeneratedAtoms)
virtual QString format()=0
void generateStatus(const Node *node, CodeMarker *marker)
virtual void generateAlsoList(const Node *node, CodeMarker *marker)
void appendFullName(Text &text, const Node *apparentNode, const Node *relative, const Node *actualNode=nullptr)
Definition generator.cpp:92
virtual void generateFileList(const ExampleNode *en, CodeMarker *marker, bool images)
This function is called when the documentation for an example is being formatted.
void generateThreadSafeness(const Node *node, CodeMarker *marker)
Generates text that explains how threadsafe and/or reentrant node is.
static void terminate()
Generator(FileResolver &file_resolver)
Constructs the generator base class.
Definition generator.cpp:76
QString m_sectionNumber
Definition generator.h:207
QDocDatabase * m_qdb
Definition generator.h:197
QString linkForExampleFile(const QString &path, const QString &fileExt=QString())
Constructs an href link from an example file name, which is a path to the example file.
bool m_inContents
Definition generator.h:199
void beginSubPage(const Node *node, const QString &fileName)
Creates the file named fileName in the output directory.
bool generateComparisonList(const Node *node)
Generates a list of types that compare to node with the comparison category that applies for the rela...
static std::optional< std::pair< QString, QString > > cmakeRequisite(const CollectionNode *cn)
Generate the CMake requisite for the node cn, i.e.
static bool useOutputSubdirs()
Definition generator.h:68
static bool noLinkErrors()
Definition generator.h:64
void generateNoexceptNote(const Node *node, CodeMarker *marker)
void unknownAtom(const Atom *atom)
QString m_link
Definition generator.h:206
static QString plainCode(const QString &markedCode)
virtual bool generateText(const Text &text, const Node *relative, CodeMarker *marker)
Generate the documentation for relative.
static QString cleanRef(const QString &ref, bool xmlCompliant=false)
Clean the given ref to be used as an HTML anchor or an xml:id.
void generateLinkToExample(const ExampleNode *en, CodeMarker *marker, const QString &exampleUrl)
Generates an external link to the project folder for example node.
virtual void terminateGenerator()
QStack< QTextStream * > outStreamStack
Definition generator.h:146
static bool matchAhead(const Atom *atom, Atom::AtomType expectedAtomType)
static bool comparePaths(const QString &a, const QString &b)
Definition generator.h:163
QString fullDocumentLocation(const Node *node)
Returns the full document location.
bool m_inLink
Definition generator.h:198
static QmlTypeNode * qmlTypeContext()
Definition generator.h:70
void addImageToCopy(const ExampleNode *en, const ResolvedFile &resolved_file)
virtual void generateDocs()
Traverses the database recursively to generate all the documentation.
bool m_inTableHeader
Definition generator.h:201
void generateOverloadedSignal(const Node *node, CodeMarker *marker)
If the node is an overloaded signal, add a node with an example on how to connect to it.
static Generator * generatorForFormat(const QString &format)
static bool appendTrademark(const Atom *atom)
Returns true if a trademark symbol should be appended to the output as determined by atom.
bool m_inSectionHeading
Definition generator.h:200
virtual int skipAtoms(const Atom *atom, Atom::AtomType type) const
int m_numTableRows
Definition generator.h:205
bool m_threeColumnEnumValueTable
Definition generator.h:202
virtual void generateQmlTypePage(QmlTypeNode *, CodeMarker *)
Definition generator.h:87
void appendFullName(Text &text, const Node *apparentNode, const QString &fullName, const Node *actualNode)
QTextStream & out()
int appendSortedQmlNames(Text &text, const Node *base, const QStringList &knownTypes, const NodeList &subs)
static const QStringList & outputFileNames()
Definition generator.h:63
virtual void generateBody(const Node *node, CodeMarker *marker)
Generate the body of the documentation from the qdoc comment found with the entity represented by the...
static QFile * openSubPageFile(const PageNode *node, const QString &fileName)
Creates the file named fileName in the output directory and returns a QFile pointing to this file.
QString outFileName()
virtual void generatePageNode(PageNode *, CodeMarker *)
Definition generator.h:88
virtual ~Generator()
Destroys the generator after removing it from the list of output generators.
Definition generator.cpp:87
void generateSince(const Node *node, CodeMarker *marker)
QMap< QString, QString > & formattingLeftMap()
int appendSortedNames(Text &text, const ClassNode *classe, const QList< RelatedClass > &classes)
static QString exampleFileTitle(const ExampleNode *relative, const QString &fileName)
Helper function to construct a title for a file or image page included in an example.
void endSubPage()
Flush the text stream associated with the subpage, and then pop it off the text stream stack and dele...
virtual void generateAddendum(const Node *node, Addendum type, CodeMarker *marker)
Definition generator.h:122
QString indent(int level, const QString &markedCode)
QString fileName(const Node *node, const QString &extension=QString()) const
If the node has a URL, return the URL as the file name.
static void resetUseOutputSubdirs()
Definition generator.h:67
@ AssociatedProperties
Definition generator.h:39
@ PrivateSignal
Definition generator.h:37
@ QmlSignalHandler
Definition generator.h:38
@ BindableProperty
Definition generator.h:40
static QString outputPrefix(const Node *node)
static bool autolinkErrors()
Definition generator.h:65
static const QString & outputSubdir()
Definition generator.h:61
bool parseArg(const QString &src, const QString &tag, int *pos, int n, QStringView *contents, QStringView *par1=nullptr)
bool m_showInternal
Definition generator.h:203
virtual void generateGenericCollectionPage(CollectionNode *, CodeMarker *)
Definition generator.h:90
virtual QString fileBase(const Node *node) const
static void supplementAlsoList(const Node *node, QList< Text > &alsoList)
QString naturalLanguage
Definition generator.h:144
virtual void initializeGenerator()
Updates the generator's m_showInternal from the Config.
virtual QString fileExtension() const =0
void initializeTextOutput()
Resets the variables used during text output.
static Qt::SortOrder sortOrder(const QString &str)
Definition generator.h:167
void generateRequiredLinks(const Node *node, CodeMarker *marker)
Generates either a link to the project folder for example node, or a list of links files/images if 'u...
static Generator * currentGenerator()
Definition generator.h:57
QString tagFile_
Definition generator.h:145
virtual qsizetype generateAtom(const Atom *, const Node *, CodeMarker *)
Definition generator.h:83
QString fileExtension() const override
Returns "html" for this subclass of Generator.
void generateProxyPage(Aggregate *aggregate, CodeMarker *marker) override
void generatePageNode(PageNode *pn, CodeMarker *marker) override
Generate the HTML page for an entity that doesn't map to any underlying parsable C++ or QML element.
void generateCppReferencePage(Aggregate *aggregate, CodeMarker *marker) override
Generate a reference page for the C++ class, namespace, or header file documented in node using the c...
QString format() override
void generateDocs() override
If qdoc is in the {-prepare} phase, traverse the primary tree to generate the index file for the curr...
void generateCollectionNode(CollectionNode *cn, CodeMarker *marker) override
Generate the HTML page for a group, module, or QML module.
~HtmlGenerator() override
Destroys the HTML output generator.
HtmlGenerator(FileResolver &file_resolver)
void generateExampleFilePage(const Node *en, ResolvedFile resolved_file, CodeMarker *marker) override
Generate an html file with the contents of a C++ or QML source file.
QString fileBase(const Node *node) const override
void generateGenericCollectionPage(CollectionNode *cn, CodeMarker *marker) override
Generate the HTML page for a generic collection.
void generateQmlTypePage(QmlTypeNode *qcn, CodeMarker *marker) override
Generate the HTML page for a QML type.
void initializeGenerator() override
Initializes the HTML output generator's data structures from the configuration (Config) singleton.
void terminateGenerator() override
Gracefully terminates the HTML output generator.
qsizetype generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker) override
Generate html from an instance of Atom.
~LinkAtom() override=default
Location location
Definition atom.h:190
bool m_resolved
Definition atom.h:193
Tree * domain() override
Definition atom.h:182
QString m_squareBracketParams
Definition atom.h:196
Node::Genus genus() override
Definition atom.h:177
LinkAtom(const LinkAtom &t)
Standard copy constructor of LinkAtom t.
Definition atom.cpp:431
Tree * m_domain
Definition atom.h:195
LinkAtom(Atom *previous, const LinkAtom &t)
Special copy constructor of LinkAtom t, where where the new LinkAtom will not be the first one in the...
Definition atom.cpp:447
void resolveSquareBracketParams() override
This function resolves the parameters that were enclosed in square brackets.
Definition atom.cpp:394
bool isLinkAtom() const override
Definition atom.h:176
Node::Genus m_genus
Definition atom.h:194
The Location class provides a way to mark a location in a file.
Definition location.h:15
QString fileName() const
Returns the file name part of the file path, ie the current file.
Definition location.cpp:185
void fatal(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted error message and then exits the program.
Definition location.cpp:263
QString fileSuffix() const
Returns the suffix of the file name.
Definition location.cpp:195
const QString & filePath() const
Returns the current path and file name.
Definition location.h:40
Location(const Location &other)
The copy constructor copies the contents of other into this Location using the assignment operator.
Definition location.cpp:59
void setColumnNo(int no)
Definition location.h:36
void error(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted error message.
Definition location.cpp:232
int lineNo() const
Returns the current line number.
Definition location.h:43
static int exitCode()
Returns the error code QDoc should exit with; EXIT_SUCCESS or the number of documentation warnings if...
Definition location.cpp:244
void report(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted report message.
Definition location.cpp:282
QString toString() const
Converts the location to a string to be prepended to error messages.
Definition location.cpp:393
int columnNo() const
Returns the current column number.
Definition location.h:44
void advanceLines(int n)
Definition location.h:26
static void initialize()
Gets several parameters from the config, including tab size, program name, and a regular expression t...
Definition location.cpp:297
Location()
Constructs an empty location.
Definition location.cpp:40
static void information(const QString &message)
Prints message to stdout followed by a {' '}.
Definition location.cpp:333
int depth() const
Definition location.h:39
void push(const QString &filePath)
Pushes filePath onto the file position stack.
Definition location.cpp:129
static void internalError(const QString &hint)
Report a program bug, including the hint.
Definition location.cpp:342
void start()
If the file position on top of the stack has a line number less than 1, set its line number to 1 and ...
Definition location.cpp:95
void warning(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted warning message.
Definition location.cpp:220
void setEtc(bool etc)
Definition location.h:34
void advance(QChar ch)
Advance the current file position, using ch to decide how to do that.
Definition location.cpp:111
void setLineNo(int no)
Definition location.h:35
Location & operator=(const Location &other)
The assignment operator does a deep copy of the entire state of other into this Location.
Definition location.cpp:69
bool isEmpty() const
Returns true if there is no file name set yet; returns false otherwise.
Definition location.h:38
bool etc() const
Definition location.h:45
~Location()
Definition location.h:20
static void terminate()
Apparently, all this does is delete the regular expression used for intercepting certain error messag...
Definition location.cpp:324
void pop()
Pops the top of the internal stack.
Definition location.cpp:149
Location(const QString &filePath)
Constructs a location with (fileName, 1, 1) on its file position stack.
Definition location.cpp:49
The ManifestWriter is responsible for writing manifest files.
This class represents a C++ namespace.
bool isFirstClassAggregate() const override
Returns true.
bool hasDocumentedChildren() const
Returns true if this namespace node contains at least one child that has documentation and is not pri...
void includeChild(Node *child)
This function is only called from QDocDatabase::resolveNamespaces().
void setTree(Tree *t)
Sets the Tree pointer to t, which means this NamespaceNode is in the Tree t.
bool wasSeen() const override
Returns true if the {\namespace} command that this NamespaceNode represents has been parsed by qdoc.
void setDocNode(NamespaceNode *ns)
Called in QDocDatabase::resolveNamespaces() to set the pointer to the NamespaceNode in which this nam...
NamespaceNode * docNode() const
Returns a pointer to the NamespaceNode that represents where the namespace documentation is actually ...
bool docMustBeGenerated() const override
Returns true if this namespace node is not private and contains at least one public child node with d...
~NamespaceNode() override=default
void reportDocumentedChildrenInUndocumentedNamespace() const
Report qdoc warning for each documented child in a namespace that is not documented.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
bool isDocumentedHere() const
Returns true if this namespace is to be documented in the current module.
void markSeen()
Sets the data member that indicates that the {\namespace} command this NamespaceNode represents has b...
bool isRelatableType() const override
Returns true.
const NodeList & includedChildren() const
Returns a const reference to the namespace node's list of included children, which contains pointers ...
void markInternal()
Sets the node's access to Private and its status to Internal.
Definition node.h:236
virtual void setLogicalModuleInfo(const QStringList &)
If this node is a CollectionNode, this function splits arg on the blank character to get a logical mo...
Definition node.h:296
bool isGenericCollection() const
Returns true if the node type is Collection.
Definition node.h:166
bool isExternalPage() const
Returns true if the node type is ExternalPage.
Definition node.h:134
bool isDontDocument() const
Returns true if this node's status is DontDocument.
Definition node.h:131
QString plainName() const
Returns this node's name member.
Definition node.cpp:471
const Doc & doc() const
Returns a reference to the node's Doc data member.
Definition node.h:271
virtual bool setTitle(const QString &)
Sets the node's title, which is used for the title of the documentation page, if one is generated for...
Definition node.h:233
bool isQmlNode() const
Returns true if this node's Genus value is QML.
Definition node.h:153
virtual void appendGroupName(const QString &)
Definition node.h:226
virtual bool isStatic() const
Returns true if the FunctionNode represents a static function.
Definition node.h:186
virtual QString logicalModuleIdentifier() const
If this is a CollectionNode, this function returns the logical module identifier.
Definition node.h:294
void setHadDoc()
Definition node.h:215
void setUrl(const QString &url)
Sets the node's URL to url, which is the url to the page that the node represents.
Definition node.h:210
virtual bool hasClasses() const
Returns true if this is a CollectionNode and its members list contains class nodes.
Definition node.h:221
virtual bool hasNamespaces() const
Returns true if this is a CollectionNode and its members list contains namespace nodes.
Definition node.h:220
bool isGroup() const
Returns true if the node type is Group.
Definition node.h:139
const QString & reconstitutedBrief() const
Definition node.h:283
void setGenus(Genus t)
Definition node.h:125
virtual bool docMustBeGenerated() const
This function is called to perform a test to decide if the node must have documentation generated.
Definition node.h:228
virtual bool isWrapper() const
Returns true if the node is a class node or a QML type node that is marked as being a wrapper class o...
Definition node.cpp:953
bool isPrivate() const
Returns true if this node's access is Private.
Definition node.h:146
virtual QString signature(Node::SignatureOptions) const
void Node::setGenus(Genus t) Sets this node's Genus to t.
Definition node.h:197
bool isActive() const
Returns true if this node's status is Active.
Definition node.h:128
void setAccess(Access t)
Sets the node's access type to t.
Definition node.h:203
const Location & defLocation() const
Returns the Location where this node's dedefinition was seen.
Definition node.h:266
void setIndexNodeFlag(bool isIndexNode=true)
Sets a flag in this Node that indicates the node was created for something in an index file.
Definition node.h:214
QString fullName(const Node *relative=nullptr) const
Constructs and returns this node's full name.
Definition node.cpp:531
virtual void setQmlModule(CollectionNode *)
If this is a QmlTypeNode, this function sets the QML type's QML module pointer to the CollectionNode ...
Definition node.h:298
virtual QString qmlTypeName() const
If this is a QmlPropertyNode or a FunctionNode representing a QML method, this function returns the q...
Definition node.h:290
virtual bool isAbstract() const
Returns true if the ClassNode or QmlTypeNode is marked abstract.
Definition node.h:169
NodeType
An unsigned char value that identifies an object as a particular subclass of Node.
Definition node.h:54
@ Variable
Definition node.h:69
@ Module
Definition node.h:71
@ Struct
Definition node.h:58
@ QmlModule
Definition node.h:73
@ Typedef
Definition node.h:66
@ QmlValueType
Definition node.h:75
@ Function
Definition node.h:65
@ TypeAlias
Definition node.h:67
@ Union
Definition node.h:59
@ Page
Definition node.h:61
@ Group
Definition node.h:70
@ Enum
Definition node.h:62
@ HeaderFile
Definition node.h:60
@ QmlProperty
Definition node.h:74
@ QmlType
Definition node.h:72
@ SharedComment
Definition node.h:76
@ Namespace
Definition node.h:56
@ Proxy
Definition node.h:78
@ Property
Definition node.h:68
@ Class
Definition node.h:57
@ NoType
Definition node.h:55
@ Collection
Definition node.h:77
@ ExternalPage
Definition node.h:64
@ Example
Definition node.h:63
SharedCommentNode * sharedCommentNode()
Definition node.h:287
bool isNamespace() const
Returns true if the node type is Namespace.
Definition node.h:143
bool isTypedef() const
Returns true if the node type is Typedef.
Definition node.h:160
bool isQmlBasicType() const
Returns true if the node type is QmlBasicType.
Definition node.h:151
virtual QString logicalModuleVersion() const
If this is a CollectionNode, this function returns the logical module version number.
Definition node.h:293
QString nodeTypeString() const
Returns this node's type as a string for use as an attribute value in XML or HTML.
Definition node.cpp:664
ComparisonCategory comparisonCategory() const
Definition node.h:217
virtual void addMember(Node *)
In a CollectionNode, this function adds node to the collection node's members list.
Definition node.h:219
bool hasFileNameBase() const
Returns true if the node's file name base has been set.
Definition node.h:200
bool isPage() const
Returns true if the node type is Page.
Definition node.h:144
virtual QString qmlFullBaseName() const
If this is a QmlTypeNode, this function returns the QML full base name.
Definition node.h:291
bool isFunction(Genus g=DontCare) const
Returns true if this is a FunctionNode and its Genus is set to g.
Definition node.h:135
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
Definition node.h:155
bool isSharedCommentNode() const
Returns true if the node type is SharedComment.
Definition node.h:158
QString physicalModuleName() const
Definition node.h:246
virtual void setCMakePackage(const QString &)
Definition node.h:250
virtual void setDataType(const QString &)
If this node is a PropertyNode or a QmlPropertyNode, its data type data member is set to dataType.
Definition node.h:224
virtual bool isInternal() const
Returns true if the node's status is Internal, or if its parent is a class with Internal status.
Definition node.cpp:849
bool isHeader() const
Returns true if the node type is HeaderFile.
Definition node.h:140
virtual bool isPageNode() const
Returns true if this node represents something that generates a documentation page.
Definition node.h:182
void setFileNameBase(const QString &t)
Sets the node's file name base to t.
Definition node.h:201
virtual bool isMacro() const
returns true if either FunctionNode::isMacroWithParams() or FunctionNode::isMacroWithoutParams() retu...
Definition node.h:181
virtual bool isDefault() const
Returns true if the QML property node is marked as default.
Definition node.h:179
bool isEnumType() const
Returns true if the node type is Enum.
Definition node.h:132
bool isStruct() const
Returns true if the node type is Struct.
Definition node.h:157
virtual bool isTextPageNode() const
Returns true if the node is a PageNode but not an Aggregate.
Definition node.h:187
virtual bool isAttached() const
Returns true if the QML property or QML method node is marked as attached.
Definition node.h:176
Aggregate * parent() const
Returns the node's parent pointer.
Definition node.h:244
static bool fromFlagValue(FlagValue fv, bool defaultValue)
Converts the enum fv back to a boolean value.
Definition node.cpp:748
bool isPublic() const
Returns true if this node's access is Public.
Definition node.h:149
bool isVariable() const
Returns true if the node type is Variable.
Definition node.h:165
void setLocation(const Location &t)
Sets the node's declaration location, its definition location, or both, depending on the suffix of th...
Definition node.cpp:886
virtual void setClassNode(ClassNode *)
If this is a QmlTypeNode, this function sets the C++ class node to cn.
Definition node.h:300
virtual ~Node()=default
The default destructor is virtual so any subclass of Node can be deleted by deleting a pointer to Nod...
QString plainFullName(const Node *relative=nullptr) const
Constructs and returns the node's fully qualified name by recursively ascending the parent links and ...
Definition node.cpp:485
virtual bool isDeprecated() const
Returns true if this node's status is Deprecated.
Definition node.h:168
virtual bool isAggregate() const
Returns true if this node is an aggregate, which means it inherits Aggregate and can therefore have c...
Definition node.h:170
NodeType nodeType() const
Returns this node's type.
Definition node.h:121
FlagValue
A value used in PropertyNode and QmlPropertyNode that can be -1, 0, or +1.
Definition node.h:114
@ FlagValueDefault
Definition node.h:114
@ FlagValueTrue
Definition node.h:114
@ FlagValueFalse
Definition node.h:114
QString qualifyQmlName()
Returns the QML node's qualified name by prepending the logical module name.
Definition node.cpp:943
void setSharedCommentNode(SharedCommentNode *t)
Definition node.h:286
void setTemplateDecl(std::optional< RelaxedTemplateDeclaration > t)
Definition node.h:211
virtual void setRelatedNonmember(bool b)
Sets a flag in the node indicating whether this node is a related nonmember of something.
Definition node.h:218
virtual Node * clone(Aggregate *)
When reimplemented in a subclass, this function creates a clone of this node on the heap and makes th...
Definition node.h:117
virtual void markReadOnly(bool)
If this node is a QmlPropertyNode, then the property's read-only flag is set to flag.
Definition node.h:242
void setComparisonCategory(const ComparisonCategory &category)
Definition node.h:216
static bool nodeNameLessThan(const Node *first, const Node *second)
Returns true if the node n1 is less than node n2.
Definition node.cpp:57
QString qualifyCppName()
Returns the CPP node's qualified name by prepending the namespaces name + "::" if there isw a namespa...
Definition node.cpp:921
ThreadSafeness inheritedThreadSafeness() const
If this node has a parent, the parent's thread safeness value is returned.
Definition node.cpp:838
const Location & location() const
If this node's definition location is empty, this function returns this node's declaration location.
Definition node.h:267
bool isProxyNode() const
Returns true if the node type is Proxy.
Definition node.h:148
virtual bool wasSeen() const
Returns the seen flag data member of this node if it is a NamespaceNode or a CollectionNode.
Definition node.h:225
bool hadDoc() const
Definition node.h:277
const std::optional< RelaxedTemplateDeclaration > & templateDecl() const
Definition node.h:282
Access access() const
Returns the node's Access setting, which can be Public, Protected, or Private.
Definition node.h:264
virtual void setWrapper()
If this node is a ClassNode or a QmlTypeNode, the node's wrapper flag data member is set to true.
Definition node.h:223
virtual QString cmakeComponent() const
Definition node.h:254
virtual void markDefault()
If this node is a QmlPropertyNode, it is marked as the default property.
Definition node.h:241
ThreadSafeness threadSafeness() const
Returns the thread safeness value for whatever this node represents.
Definition node.cpp:826
virtual QString qtVariable() const
If this node is a CollectionNode, its QT variable is returned.
Definition node.h:249
Genus
An unsigned char value that specifies whether the Node represents a C++ element, a QML element,...
Definition node.h:81
@ DontCare
Definition node.h:82
@ API
Definition node.h:86
@ CPP
Definition node.h:83
@ DOC
Definition node.h:85
@ QML
Definition node.h:84
virtual QString logicalModuleName() const
If this is a CollectionNode, this function returns the logical module name.
Definition node.h:292
Aggregate * root() const
bool isInAPI() const
Definition node.h:272
virtual bool isFirstClassAggregate() const
Returns true if this Node is an Aggregate but not a ProxyNode.
Definition node.h:171
virtual bool isMarkedReimp() const
Returns true if the FunctionNode is marked as a reimplemented function.
Definition node.h:184
bool isProperty() const
Returns true if the node type is Property.
Definition node.h:147
virtual QString cmakePackage() const
Definition node.h:253
QString fullDocumentName() const
Construct the full document name for this node and return it.
Definition node.cpp:961
QString url() const
Returns the node's URL, which is the url of the documentation page created for the node or the url of...
Definition node.h:247
bool isTypeAlias() const
Returns true if the node type is Typedef.
Definition node.h:159
virtual Tree * tree() const
Returns a pointer to the Tree this node is in.
Definition node.cpp:876
const Location & declLocation() const
Returns the Location where this node's declaration was seen.
Definition node.h:265
void setDoc(const Doc &doc, bool replace=false)
Sets this Node's Doc to doc.
Definition node.cpp:546
virtual QString title() const
Returns a string that can be used to print a title in the documentation for whatever this Node is.
Definition node.h:230
virtual void setCMakeComponent(const QString &)
Definition node.h:251
virtual bool setSubtitle(const QString &)
Sets the node's subtitle, which is used for the subtitle of the documentation page,...
Definition node.h:234
bool isModule() const
Returns true if the node type is Module.
Definition node.h:142
virtual bool isAlias() const
Returns true if this QML property is marked as an alias.
Definition node.h:175
virtual QString element() const
If this node is a QmlPropertyNode or a FunctionNode, this function returns the name of the parent nod...
Definition node.h:227
virtual QString subtitle() const
Returns a string that can be used to print a subtitle in the documentation for whatever this Node is.
Definition node.h:231
Node(NodeType type, Aggregate *parent, QString name)
Construct a node with the given type and having the given parent and name.
Definition node.cpp:584
virtual ClassNode * classNode()
If this is a QmlTypeNode, this function returns the pointer to the C++ ClassNode that this QML type r...
Definition node.h:299
bool isClass() const
Returns true if the node type is Class.
Definition node.h:129
const QString & fileNameBase() const
Returns the node's file name base string, which is built once, when Generator::fileBase() is called a...
Definition node.h:199
virtual bool isPropertyGroup() const
Returns true if the node is a SharedCommentNode for documenting multiple C++ properties or multiple Q...
Definition node.h:185
Genus genus() const
Returns this node's Genus.
Definition node.h:124
ThreadSafeness
An unsigned char that specifies the degree of thread-safeness of the element.
Definition node.h:97
@ ThreadSafe
Definition node.h:101
@ NonReentrant
Definition node.h:99
@ UnspecifiedSafeness
Definition node.h:98
@ Reentrant
Definition node.h:100
virtual QString fullTitle() const
Returns a string that can be used as the full title for the documentation of this node.
Definition node.h:232
static QString nodeTypeString(NodeType t)
Returns the node type t as a string for use as an attribute value in XML or HTML.
Definition node.cpp:677
bool isSharingComment() const
This function returns true if the node is sharing a comment with other nodes.
Definition node.h:285
virtual void setCMakeTargetItem(const QString &)
Definition node.h:252
virtual CollectionNode * logicalModule() const
If this is a QmlTypeNode, a pointer to its QML module is returned, which is a pointer to a Collection...
Definition node.h:297
QString since() const
Returns the node's since string, which can be empty.
Definition node.h:281
virtual void setAbstract(bool)
If this node is a ClassNode or a QmlTypeNode, the node's abstract flag data member is set to b.
Definition node.h:222
bool hasDoc() const
Returns true if this node is documented, or it represents a documented node read from the index ('had...
Definition node.cpp:906
void setParent(Aggregate *n)
Sets the node's parent pointer to n.
Definition node.h:213
bool isPreliminary() const
Returns true if this node's status is Preliminary.
Definition node.h:145
static FlagValue toFlagValue(bool b)
Converts the boolean value b to an enum representation of the boolean type, which includes an enum va...
Definition node.cpp:737
void setReconstitutedBrief(const QString &t)
When reading an index file, this function is called with the reconstituted brief clause t to set the ...
Definition node.h:212
LinkType
An unsigned char value that probably should be moved out of the Node base class.
Definition node.h:112
virtual bool hasTag(const QString &) const
If this node is a FunctionNode, the function returns true if the function has the tag t.
Definition node.h:256
virtual QString cmakeTargetItem() const
Definition node.h:255
bool isRelatedNonmember() const
Returns true if this is a related nonmember of something.
Definition node.h:156
void setSince(const QString &since)
Sets the information about the project and version a node was introduced in, unless the version is lo...
Definition node.cpp:778
virtual bool isClassNode() const
Returns true if this is an instance of ClassNode.
Definition node.h:177
bool isCppNode() const
Returns true if this node's Genus value is CPP.
Definition node.h:130
void setStatus(Status t)
Sets the node's status to t.
Definition node.cpp:560
QString extractClassName(const QString &string) const
Extract a class name from the type string and return it.
Definition node.cpp:798
void setDeprecated(const QString &sinceVersion)
Sets the Node status to Node::Deprecated, unless sinceVersion represents a future version.
Definition node.cpp:1008
virtual bool isRelatableType() const
Returns true if this node is something you can relate things to with the relates command.
Definition node.h:183
virtual bool isCollectionNode() const
Returns true if this is an instance of CollectionNode.
Definition node.h:178
static bool nodeSortKeyOrNameLessThan(const Node *n1, const Node *n2)
Returns true if node n1 is less than node n2 when comparing the sort keys, defined with.
Definition node.cpp:99
void setThreadSafeness(ThreadSafeness t)
Sets the node's thread safeness to t.
Definition node.h:207
void setPhysicalModuleName(const QString &name)
Sets the node's physical module name.
Definition node.h:209
Status
An unsigned char that specifies the status of the documentation element in the documentation set.
Definition node.h:89
@ Internal
Definition node.h:93
@ Active
Definition node.h:92
@ DontDocument
Definition node.h:94
@ Deprecated
Definition node.h:90
@ Preliminary
Definition node.h:91
bool isQmlModule() const
Returns true if the node type is QmlModule.
Definition node.h:152
SignatureOption
Definition node.h:104
@ SignatureReturnType
Definition node.h:107
@ SignatureDefaultValues
Definition node.h:106
@ SignaturePlain
Definition node.h:105
@ SignatureTemplateParams
Definition node.h:108
bool isProtected() const
Returns true if this node's access is Protected.
Definition node.h:150
bool isExample() const
Returns true if the node type is Example.
Definition node.h:133
QString qualifyWithParentName()
Return the name of this node qualified with the parent name and "::" if there is a parent name.
Definition node.cpp:932
bool isIndexNode() const
Returns true if this node was created from something in an index file.
Definition node.h:141
QString plainSignature() const
Constructs and returns the node's fully qualified signature by recursively ascending the parent links...
Definition node.cpp:509
Status status() const
Returns the node's status value.
Definition node.h:278
bool isUnion() const
Returns true if the node type is Union.
Definition node.h:164
const QString & deprecatedSince() const
Definition node.h:259
bool isQmlProperty() const
Returns true if the node type is QmlProperty.
Definition node.h:154
virtual void setQtVariable(const QString &)
If this node is a CollectionNode, its QT variable is set to v.
Definition node.h:248
const QString & name() const
Returns the node's name data member.
Definition node.h:245
static Genus getGenus(NodeType t)
Determines the appropriate Genus value for the NodeType value t and returns that Genus value.
Definition node.cpp:607
A PageNode is a Node that generates a documentation page.
Definition pagenode.h:18
bool isTextPageNode() const override
Returns true if this instance of PageNode is not an Aggregate.
Definition pagenode.h:24
QString title() const override
Returns the node's title, which is used for the page title.
Definition pagenode.h:29
void setNoAutoList(bool b)
Sets the no auto-list flag to b.
Definition pagenode.h:42
QString fullTitle() const override
Returns the node's full title.
Definition pagenode.cpp:38
bool m_noAutoList
Definition pagenode.h:56
QString m_title
Definition pagenode.h:57
const PageNode * navigationParent() const
Definition pagenode.h:46
bool is_attribution
Definition pagenode.h:74
QStringList m_groupNames
Definition pagenode.h:59
bool isPageNode() const override
Always returns true because this is a PageNode.
Definition pagenode.h:23
virtual QString imageFileName() const
If this PageNode is an ExampleNode, the image file name data member is returned.
Definition pagenode.h:38
QString subtitle() const override
Returns the node's subtitle, which may be empty.
Definition pagenode.h:30
QString m_subtitle
Definition pagenode.h:58
void markAttribution()
Definition pagenode.h:49
bool noAutoList() const
Returns the value of the no auto-list flag.
Definition pagenode.h:41
void setNavigationParent(const PageNode *parent)
Definition pagenode.h:47
bool isAttribution() const
Definition pagenode.h:50
const QStringList & groupNames() const
Returns a const reference to the string list containing all the group names.
Definition pagenode.h:43
The Parameter class describes one function parameter.
Definition parameters.h:20
const QString & type() const
Definition parameters.h:30
void set(const QString &type, const QString &name, const QString &defaultValue=QString())
Definition parameters.h:35
const QString & name() const
Definition parameters.h:31
void setDefaultValue(const QString &t)
Definition parameters.h:33
Parameter(QString type, QString name=QString(), QString defaultValue=QString())
Definition parameters.h:23
Parameter()=default
QString signature(bool includeValue=false) const
Reconstructs the text signature for the parameter and returns it.
QString m_name
Definition parameters.h:50
QString m_canonicalType
Definition parameters.h:48
void setCanonicalType(const QString &t)
Definition parameters.h:45
QString m_defaultValue
Definition parameters.h:51
void setName(const QString &name)
Definition parameters.h:28
bool hasType() const
Definition parameters.h:29
const QString & canonicalType() const
Definition parameters.h:44
QString m_type
Definition parameters.h:49
const QString & defaultValue() const
Definition parameters.h:32
A class for parsing and managing a function parameter list.
Definition parameters.h:57
Parameter & operator[](int index)
Definition parameters.h:77
const ParameterVector & parameters() const
Definition parameters.h:68
bool isEmpty() const
Definition parameters.h:70
void append(const QString &type)
Definition parameters.h:80
void pop_back()
Definition parameters.h:81
QSet< QString > getNames() const
Insert all the parameter names into names.
bool match(const Parameters &parameters) const
Returns true if parameters contains the same parameter signature as this.
void reserve(int count)
Definition parameters.h:73
Parameters(const QString &signature)
QString rawSignature(bool names=false, bool values=false) const
Returns the signature of all the parameters with all the spaces and commas removed.
QString generateTypeList() const
Construct a list of the parameter types and return it.
bool isValid() const
Definition parameters.h:71
void clear()
Definition parameters.h:62
Parameter & last()
Definition parameters.h:75
bool isPrivateSignal() const
Definition parameters.h:69
const Parameter & at(int i) const
Definition parameters.h:74
void append(const QString &type, const QString &name)
Definition parameters.h:79
QString signature(bool includeValues=false) const
Returns the list of reconstructed parameters.
const Parameter & last() const
Definition parameters.h:76
int count() const
Definition parameters.h:72
QString generateTypeAndNameList() const
Construct a list of the parameter type/name pairs and return it.
void append(const QString &type, const QString &name, const QString &value)
Append a Parameter constructed from type, name, and value to the parameter vector.
void set(const QString &signature)
Parse the parameter signature by splitting the string, and store the individual parameters in the par...
void setPrivateSignal()
Definition parameters.h:82
This class describes one instance of using the Q_PROPERTY macro.
void setWritable(bool writable)
const NodeList & getters() const
void setStored(bool stored)
const NodeList & resetters() const
const NodeList & functions(FunctionRole role) const
bool isConstant() const
const NodeList & setters() const
PropertyType propertyType() const
void setRequired()
static QString roleName(FunctionRole role)
Returns a string representing an access function role.
void setPropertyType(PropertyType type)
bool isRequired() const
const NodeList & notifiers() const
const PropertyNode * overriddenFrom() const
void addFunction(FunctionNode *function, FunctionRole role)
void setConstant()
const QString & dataType() const
bool isStored() const
bool writableDefault() const
bool isWritable() const
FunctionRole role(const FunctionNode *functionNode) const
Returns the role of functionNode for this property.
void setOverriddenFrom(const PropertyNode *baseProperty)
Sets this property's {overridden from} property to baseProperty, which indicates that this property o...
void addSignal(FunctionNode *function, FunctionRole role)
NodeList functions() const
bool storedDefault() const
QString qualifiedDataType() const
Returns a string containing the data type qualified with "const" either prepended to the data type or...
A class for representing an Aggregate that is documented in a different module.
Definition proxynode.h:14
bool docMustBeGenerated() const override
Returns true because a ProxyNode always means some documentation must be generated.
Definition proxynode.h:17
bool isRelatableType() const override
Returns true because the ProxyNode exists so that elements can be related to it with the {\relates}...
Definition proxynode.h:18
PureDocParser(const Location &location)
std::vector< UntiedDocumentation > parse_qdoc_file(const QString &filePath)
Parses the source file identified by filePath and adds its parsed contents to the database.
This class provides exclusive access to the qdoc database, which consists of a forrest of trees and a...
Node * findNodeForInclude(const QStringList &path)
NodeMapMap & getFunctionIndex()
Returns the function index.
void setSearchOrder(QStringList &t)
void resolveNamespaces()
Multiple namespace nodes for namespace X can exist in the qdoc database in different trees.
TextToNodeMap & getLegaleseTexts()
Returns a reference to the collection of legalese texts.
QString version() const
NodeMultiMap & getAttributions()
Returns a reference to the multimap of attribution nodes.
static void destroyQdocDB()
Destroys the singleton.
void addExampleNode(ExampleNode *n)
NodeMultiMap & getQmlTypesWithObsoleteMembers()
Returns a reference to the map of QML types with obsolete members.
NodeMultiMap & getObsoleteQmlTypes()
Returns a reference to the map of obsolete QML types.
static NodeMultiMapMap & newQmlTypeMaps()
static NodeMultiMap & classesWithObsoleteMembers()
static QDocDatabase * qdocDB()
Creates the singleton.
const CNMap & qmlModules()
Returns a const reference to the collection of all QML module nodes in the primary tree.
void resolveBaseClasses()
static NodeMultiMap & qmlTypes()
NodeMultiMap & getQmlTypes()
Returns a reference to the multimap of QML types.
NodeMultiMap & getClassesWithObsoleteMembers()
Returns a reference to the map of C++ classes with obsolete members.
~QDocDatabase()=default
NodeMultiMap & getQmlValueTypes()
Returns a reference to the map of QML basic types.
static NodeMultiMapMap & newEnumValueMaps()
static NodeMultiMap & obsoleteClasses()
NodeMultiMap & getCppClasses()
Returns a reference to the map of all C++ classes.
QStringList groupNamesForNode(Node *node)
NamespaceNode * primaryTreeRoot()
Returns a pointer to the root node of the primary tree.
void readIndexes(const QStringList &indexFiles)
Reads and parses the qdoc index files listed in indexFiles.
static NodeMultiMapMap & newSinceMaps()
static NodeMultiMap & obsoleteQmlTypes()
NodeMultiMap & getNamespaces()
Returns a reference to the namespace map.
const CNMap & modules()
Returns a const reference to the collection of all module nodes in the primary tree.
QStringList keys()
static NodeMultiMap & cppClasses()
Aggregate * findRelatesNode(const QStringList &path)
NodeMultiMap & getExamples()
Returns a reference to the multimap of example nodes.
static NodeMultiMap & qmlBasicTypes()
ClassNode * findClassNode(const QStringList &path)
void processForest()
This function calls a set of functions for each tree in the forest that has not already been analyzed...
void clearSearchOrder()
Node * findNodeByNameAndType(const QStringList &path, bool(Node::*isMatch)() const)
void updateNavigation()
Updates navigation (previous/next page links and the navigation parent) for pages listed in the TOC,...
void setSearchOrder(const QList< Tree * > &searchOrder)
ExampleNodeMap & exampleNodeMap()
static NodeMultiMap & qmlTypesWithObsoleteMembers()
void resolveStuff()
Performs several housekeeping tasks prior to generating the documentation.
static NodeMultiMapMap & newClassMaps()
Tree * primaryTree()
NodeMultiMap & getObsoleteClasses()
Returns a reference to the map of obsolete C++ clases.
static NodeMultiMap & examples()
const CollectionNode * getModuleNode(const Node *relative)
Returns the collection node representing the module that relative node belongs to,...
void resolveProxies()
Each instance of class Tree that represents an index file must be traversed to find all instances of ...
void mergeCollections(Node::NodeType type, CNMap &cnm, const Node *relative)
Finds all the collection nodes of the specified type and merges them into the collection node map cnm...
void mergeCollections(CollectionNode *c)
Finds all the collection nodes with the same name and type as c and merges their members into the mem...
const CNMap & groups()
Returns a const reference to the collection of all group nodes in the primary tree.
const QList< Tree * > & searchOrder()
void setLocalSearch()
A class representing a forest of Tree objects.
QmlCodeMarker()=default
QString markedUpName(const Node *node) override
Constructs and returns the marked up name for the node.
bool recognizeCode(const QString &code) override
Returns true if the code is recognized by the parser.
bool recognizeLanguage(const QString &language) override
Returns true if the language is recognized.
QString markedUpCode(const QString &code, const Node *relative, const Location &location) override
bool recognizeExtension(const QString &ext) override
Returns true if ext is any of a list of file extensions for the QML language.
~QmlCodeMarker() override=default
QList< QQmlJS::SourceLocation > extractPragmas(QString &script)
Atom::AtomType atomType() const override
Returns the type of atom used to represent QML code in the documentation.
void initializeParser() override
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.
QmlCodeParser()=default
void extractPragmas(QString &script)
Copy & paste from src/declarative/qml/qdeclarativescriptparser.cpp, then modified to return no values...
void terminateParser() override
Terminating a code parser is trivial.
~QmlCodeParser() override=default
static void terminate()
Clear the static maps so that subsequent runs don't try to use contents from a previous run.
void setAbstract(bool b) override
If this node is a ClassNode or a QmlTypeNode, the node's abstract flag data member is set to b.
Definition qmltypenode.h:30
ClassNode * classNode() override
If this is a QmlTypeNode, this function returns the pointer to the C++ ClassNode that this QML type r...
Definition qmltypenode.h:26
void setImportList(const ImportList &il)
Definition qmltypenode.h:40
bool isInternal() const override
Returns true if the node's status is Internal, or if its parent is a class with Internal status.
Definition qmltypenode.h:32
void setQmlModule(CollectionNode *t) override
If this is a QmlTypeNode, this function sets the QML type's QML module pointer to the CollectionNode ...
Definition qmltypenode.h:38
QString qmlFullBaseName() const override
If this QML type node has a base type node, return the fully qualified name of that QML type,...
QString logicalModuleIdentifier() const override
If the QML type's QML module pointer is set, return the QML module identifier from the QML module nod...
static QMultiMap< const Node *, Node * > s_inheritedBy
Definition qmltypenode.h:51
bool inherits(Aggregate *type)
Returns true if this QML type inherits type.
bool isWrapper() const override
Returns true if the node is a class node or a QML type node that is marked as being a wrapper class o...
Definition qmltypenode.h:29
QString logicalModuleVersion() const override
If the QML type's QML module pointer is set, return the QML module version from the QML module node.
bool isAbstract() const override
Returns true if the ClassNode or QmlTypeNode is marked abstract.
Definition qmltypenode.h:28
void resolveInheritance(NodeMap &previousSearches)
Recursively resolves the base node for this QML type when only the name of the base type is known.
void setWrapper() override
If this node is a ClassNode or a QmlTypeNode, the node's wrapper flag data member is set to true.
Definition qmltypenode.h:31
static void addInheritedBy(const Node *base, Node *sub)
Record the fact that QML class base is inherited by QML class sub.
const QString & qmlBaseName() const
Definition qmltypenode.h:41
QString logicalModuleName() const override
If the QML type's QML module pointer is set, return the QML module name from the QML module node.
bool isFirstClassAggregate() const override
Returns true if this Node is an Aggregate but not a ProxyNode.
Definition qmltypenode.h:25
static void subclasses(const Node *base, NodeList &subs)
Loads the list subs with the nodes of all the subclasses of base.
QmlTypeNode * qmlBaseNode() const override
If this Aggregate is a QmlTypeNode, this function returns a pointer to the QmlTypeNode that is its ba...
Definition qmltypenode.h:43
void setClassNode(ClassNode *cn) override
If this is a QmlTypeNode, this function sets the C++ class node to cn.
Definition qmltypenode.h:27
CollectionNode * logicalModule() const override
If this is a QmlTypeNode, a pointer to its QML module is returned, which is a pointer to a Collection...
Definition qmltypenode.h:37
A class for containing the elements of one documentation section.
Definition sections.h:17
const QString & singular() const
Definition sections.h:47
void clear()
A Section is now an element in a static vector, so we don't have to repeatedly construct and destroy ...
Definition sections.cpp:135
void setAggregate(Aggregate *t)
Definition sections.h:59
const NodeVector & obsoleteMembers() const
Definition sections.h:56
void appendMembers(const NodeVector &nv)
Definition sections.h:57
void insert(Node *node)
Inserts the node into this section if it is appropriate for this section.
Definition sections.cpp:205
void reduce()
If this section is not empty, convert its maps to sequential structures for better traversal during d...
Definition sections.cpp:281
ClassNodesList & classNodesList()
Definition sections.h:55
const Aggregate * aggregate() const
Definition sections.h:58
const NodeVector & reimplementedMembers() const
Definition sections.h:50
const QString & title() const
Definition sections.h:45
const QString & plural() const
Definition sections.h:48
const QList< std::pair< Aggregate *, int > > & inheritedMembers() const
Definition sections.h:51
void appendMember(Node *node)
Definition sections.h:34
@ Summary
Definition sections.h:19
@ Details
Definition sections.h:19
@ Accessors
Definition sections.h:19
@ AllMembers
Definition sections.h:19
bool insertReimplementedMember(Node *node)
Returns true if the node is a reimplemented member function of the current class.
Definition sections.cpp:260
const QString & divClass() const
Definition sections.h:46
~Section()
The destructor must delete the members of collections when the members are allocated on the heap.
Definition sections.cpp:124
const NodeVector & members() const
Definition sections.h:49
Style style() const
Definition sections.h:44
bool isEmpty() const
Definition sections.h:38
A class for creating vectors of collections for documentation.
Definition sections.h:82
Aggregate * aggregate() const
Definition sections.h:181
const SectionVector & stdCppClassDetailsSections() const
Definition sections.h:168
void buildStdCppClassRefPageSections()
Build the section vectors for a standard reference page, when the aggregate node is a C++.
Definition sections.cpp:850
Sections(Aggregate *aggregate)
This constructor builds the vectors of sections based on the type of the aggregate node.
Definition sections.cpp:344
SectionVector & stdCppClassSummarySections()
Definition sections.h:157
SectionVector & stdQmlTypeSummarySections()
Definition sections.h:159
~Sections()
The behavior of the destructor depends on the type of the Aggregate node that was passed to the const...
Definition sections.cpp:464
SectionVector & stdDetailsSections()
Definition sections.h:156
const SectionVector & stdQmlTypeDetailsSections() const
Definition sections.h:176
const SectionVector & stdCppClassSummarySections() const
Definition sections.h:164
const SectionVector & stdQmlTypeSummarySections() const
Definition sections.h:172
void buildStdRefPageSections()
Build the section vectors for a standard reference page, when the aggregate node is not a C++ class o...
Definition sections.cpp:597
void clear(SectionVector &v)
Reset each Section in vector v to its initialized state.
Definition sections.cpp:505
SectionVector & stdCppClassDetailsSections()
Definition sections.h:158
void reduce(SectionVector &v)
Linearize the maps in each Section in v.
Definition sections.cpp:514
const SectionVector & stdDetailsSections() const
Definition sections.h:163
void buildStdQmlTypeRefPageSections()
Build the section vectors for a standard reference page, when the aggregate node is a QML type.
Definition sections.cpp:893
SectionVector & stdQmlTypeDetailsSections()
Definition sections.h:160
SectionVector & sinceSections()
Definition sections.h:154
@ QmlMethods
Definition sections.h:114
@ SinceQmlTypes
Definition sections.h:127
@ PrivateSlots
Definition sections.h:134
@ PrivateFunctions
Definition sections.h:132
@ PublicVariables
Definition sections.h:110
@ SinceProperties
Definition sections.h:123
@ PublicSlots
Definition sections.h:100
@ DetailsProperties
Definition sections.h:91
@ SinceQmlProperties
Definition sections.h:129
@ SinceGlobalFunctions
Definition sections.h:106
@ SinceNamespaces
Definition sections.h:87
@ SinceTypeAliases
Definition sections.h:121
@ SinceNamespaceFunctions
Definition sections.h:102
@ SinceQmlMethods
Definition sections.h:135
@ DetailsMemberVariables
Definition sections.h:101
@ SinceMemberFunctions
Definition sections.h:97
@ SinceQmlSignalHandlers
Definition sections.h:133
@ QmlSignals
Definition sections.h:99
@ ProtectedSlots
Definition sections.h:124
@ QmlProperties
Definition sections.h:89
@ StaticPublicMembers
Definition sections.h:115
@ ProtectedFunctions
Definition sections.h:122
@ SinceMacros
Definition sections.h:111
@ PublicTypes
Definition sections.h:85
@ RelatedNonmembers
Definition sections.h:137
@ QmlSignalHandlers
Definition sections.h:104
@ StdVariables
Definition sections.h:103
@ StdNamespaces
Definition sections.h:88
@ ProtectedVariables
Definition sections.h:126
@ SinceClasses
Definition sections.h:92
@ StaticProtectedMembers
Definition sections.h:128
@ DetailsMacros
Definition sections.h:112
@ ProtectedTypes
Definition sections.h:120
@ QmlAttachedSignals
Definition sections.h:109
@ QmlAttachedProperties
Definition sections.h:94
@ DetailsMemberTypes
Definition sections.h:86
@ StdClasses
Definition sections.h:93
@ PublicFunctions
Definition sections.h:95
@ SinceEnumTypes
Definition sections.h:116
@ PrivateTypes
Definition sections.h:130
@ QmlAttachedMethods
Definition sections.h:118
@ DetailsRelatedNonmembers
Definition sections.h:107
@ SinceEnumValues
Definition sections.h:119
@ SinceQmlSignals
Definition sections.h:131
@ StdFunctions
Definition sections.h:113
@ SinceVariables
Definition sections.h:125
@ StaticPrivateMembers
Definition sections.h:136
@ StdMacros
Definition sections.h:117
@ Properties
Definition sections.h:90
@ StdStaticVariables
Definition sections.h:108
@ StdTypes
Definition sections.h:98
@ DetailsMemberFunctions
Definition sections.h:96
Sections(const NodeMultiMap &nsmap)
This constructor builds a vector of sections from the since node map, nsmap.
Definition sections.cpp:376
bool hasObsoleteMembers(SectionPtrVector *summary_spv, SectionPtrVector *details_spv) const
Returns true if any sections in this object contain obsolete members.
Definition sections.cpp:955
SectionVector & stdSummarySections()
Definition sections.h:155
const SectionVector & stdSummarySections() const
Definition sections.h:162
static Section & allMembersSection()
Definition sections.h:153
SourceFileParser(ClangCodeParser &clang_parser, PureDocParser &pure_parser)
ParseResult operator()(const TaggedSourceFile &source)
Definition text.h:12
static Text subText(const Atom *begin, const Atom *end=nullptr)
Definition text.cpp:257
static Text sectionHeading(const Atom *sectionBegin)
Definition text.cpp:176
void dump() const
Prints a human-readable version of the contained atoms to stderr.
Definition text.cpp:225
~Text()
Definition text.cpp:24
const Atom * firstAtom() const
Definition text.h:34
Text splitAtFirst(Atom::AtomType start)
Splits the current Text from start to end into a new Text object.
Definition text.cpp:313
bool isEmpty() const
Definition text.h:31
Text subText(Atom::AtomType left, Atom::AtomType right, const Atom *from=nullptr, bool inclusive=false) const
Definition text.cpp:153
void stripFirstAtom()
Definition text.cpp:91
Text(const Text &text)
Definition text.cpp:19
Atom * firstAtom()
Definition text.h:21
void clear()
Definition text.cpp:269
Text & operator=(const Text &text)
Definition text.cpp:29
Text()
Definition text.cpp:12
const Atom * lastAtom() const
Definition text.h:35
QString toString() const
This function traverses the atom list of the Text object, extracting all the string parts.
Definition text.cpp:124
void stripLastAtom()
Definition text.cpp:102
Atom * lastAtom()
Definition text.h:22
static int compare(const Text &text1, const Text &text2)
Definition text.cpp:280
static void terminate()
The heap allocated variables are freed here.
static void initialize()
This class constructs and maintains a tree of instances of the subclasses of Node.
Definition tree.h:56
const QString & indexTitle() const
Definition tree.h:74
void markDontDocumentNodes()
The {don't document} map has been loaded with the names of classes and structs in the current module ...
Definition tree.cpp:1391
NodeList & proxies()
Definition tree.h:76
void appendProxy(ProxyNode *t)
Definition tree.h:77
const QString & camelCaseModuleName() const
Definition tree.h:71
static QString refForAtom(const Atom *atom)
Returns a canonical title for the atom, if the atom is a SectionLeft, SectionHeadingLeft,...
Definition tree.cpp:991
Node * findNodeByNameAndType(const QStringList &path, bool(Node::*isMatch)() const) const
Find the node with the specified path name that is of the specified type and subtype.
Definition tree.cpp:410
const QString & physicalModuleName() const
Definition tree.h:72
const QString & indexFileName() const
Definition tree.h:73
WebXMLGenerator(FileResolver &file_resolver)
std::pair< QString, QString > anchorForNode(const Node *node)
static bool isThreeColumnEnumValueTable(const Atom *atom)
Determines whether the list atom should be shown with three columns (constant-value-description).
QString getLink(const Atom *atom, const Node *relative, const Node **node)
This function is called for links, i.e.
static Node::NodeType typeFromString(const Atom *atom)
Returns the type of this atom as an enumeration.
QString refForNode(const Node *node)
Generates a clean and unique reference for the given node.
QHash< QString, QString > refMap
static bool isOneColumnValueTable(const Atom *atom)
Determines whether the list atom should be shown with just one column (value).
static QString targetType(const Node *node)
Returns a string describing the node type.
QString linkForNode(const Node *node, const Node *relative)
Construct the link string for the node and return it.
static void setImageFileName(const Node *relative, const QString &fileName)
For images shown in examples, set the image file to the one it will have once the documentation is ge...
static void rewritePropertyBrief(const Atom *atom, const Node *relative)
Rewrites the brief of this node depending on its first word.
static int hOffset(const Node *node)
Header offset depending on the type of the node.
static bool hasBrief(const Node *node)
Do not display.
XmlGenerator(FileResolver &file_resolver)
const Node * m_linkNode
QString getAutoLink(const Atom *atom, const Node *relative, const Node **node, Node::Genus=Node::DontCare)
This function is called for autolinks, i.e.
static std::pair< QString, int > getAtomListValue(const Atom *atom)
Handles the differences in lists between list tags and since tags, and returns the content of the lis...
static const QRegularExpression m_funcLeftParen
QString registerRef(const QString &ref, bool xmlCompliant=false)
Registers an anchor reference and returns a unique and cleaned copy of the reference (the one that sh...
static std::pair< QString, QString > getTableWidthAttr(const Atom *atom)
Parses the table attributes from the given atom.
#define COMMAND_ENUM
Definition codeparser.h:23
#define COMMAND_HEADERFILE
Definition codeparser.h:28
#define COMMAND_EXTERNALPAGE
Definition codeparser.h:25
#define COMMAND_QMLINHERITS
Definition codeparser.h:56
#define COMMAND_MODULE
Definition codeparser.h:36
#define COMMAND_MODULESTATE
Definition codeparser.h:37
#define COMMAND_INTERNAL
Definition codeparser.h:34
#define COMMAND_NONREENTRANT
Definition codeparser.h:41
#define COMMAND_QMLSIGNAL
Definition codeparser.h:65
#define COMMAND_OBSOLETE
Definition codeparser.h:42
#define COMMAND_INMODULE
Definition codeparser.h:31
#define COMMAND_STRUCT
Definition codeparser.h:74
#define COMMAND_DEPRECATED
Definition codeparser.h:21
#define COMMAND_PRELIMINARY
Definition codeparser.h:45
#define COMMAND_QMLPROPERTYGROUP
Definition codeparser.h:62
#define COMMAND_PROPERTY
Definition codeparser.h:47
#define COMMAND_NEXTPAGE
Definition codeparser.h:39
#define COMMAND_RELATES
Definition codeparser.h:72
#define COMMAND_WRAPPER
Definition codeparser.h:84
#define COMMAND_CLASS
Definition codeparser.h:14
#define COMMAND_NAMESPACE
Definition codeparser.h:38
#define COMMAND_CMAKETARGETITEM
Definition codeparser.h:17
#define COMMAND_REENTRANT
Definition codeparser.h:70
#define COMMAND_QMLMODULE
Definition codeparser.h:59
#define COMMAND_QMLPROPERTY
Definition codeparser.h:61
#define COMMAND_TITLE
Definition codeparser.h:78
#define COMMAND_STARTPAGE
Definition codeparser.h:76
#define COMMAND_QMLDEFAULT
Definition codeparser.h:54
#define COMMAND_SINCE
Definition codeparser.h:73
#define COMMAND_QMLABSTRACT
Definition codeparser.h:48
#define COMMAND_QMLNATIVETYPE
Definition codeparser.h:60
#define COMMAND_FN
Definition codeparser.h:26
#define COMMAND_OVERLOAD
Definition codeparser.h:43
#define COMMAND_QTVARIABLE
Definition codeparser.h:69
#define COMMAND_QTCMAKEPACKAGE
Definition codeparser.h:67
#define COMMAND_NOAUTOLIST
Definition codeparser.h:40
#define COMMAND_QMLATTACHEDPROPERTY
Definition codeparser.h:50
#define COMMAND_UNION
Definition codeparser.h:83
#define COMMAND_COMPARESWITH
Definition codeparser.h:19
#define COMMAND_QTCMAKETARGETITEM
Definition codeparser.h:68
#define COMMAND_MACRO
Definition codeparser.h:35
#define COMMAND_GROUP
Definition codeparser.h:27
#define COMMAND_REIMP
Definition codeparser.h:71
#define COMMAND_VARIABLE
Definition codeparser.h:81
#define COMMAND_INHEADERFILE
Definition codeparser.h:30
#define COMMAND_PREVIOUSPAGE
Definition codeparser.h:46
#define COMMAND_QMLBASICTYPE
Definition codeparser.h:88
#define COMMAND_PAGE
Definition codeparser.h:44
#define COMMAND_EXAMPLE
Definition codeparser.h:24
#define COMMAND_COMPARES
Definition codeparser.h:18
#define COMMAND_DEFAULT
Definition codeparser.h:20
#define COMMAND_THREADSAFE
Definition codeparser.h:77
#define COMMAND_TYPEDEF
Definition codeparser.h:80
#define COMMAND_QMLMETHOD
Definition codeparser.h:58
#define COMMAND_DONTDOCUMENT
Definition codeparser.h:22
#define COMMAND_CMAKECOMPONENT
Definition codeparser.h:16
#define COMMAND_QMLREADONLY
Definition codeparser.h:63
#define COMMAND_QMLENUMERATORSFROM
Definition codeparser.h:55
#define COMMAND_INPUBLICGROUP
Definition codeparser.h:32
#define COMMAND_QMLREQUIRED
Definition codeparser.h:64
#define COMMAND_ABSTRACT
Definition codeparser.h:13
#define COMMAND_QMLVALUETYPE
Definition codeparser.h:52
#define COMMAND_ATTRIBUTION
Definition codeparser.h:85
#define COMMAND_INQMLMODULE
Definition codeparser.h:33
#define COMMAND_QMLINSTANTIATES
Definition codeparser.h:57
#define COMMAND_TYPEALIAS
Definition codeparser.h:79
#define COMMAND_CMAKEPACKAGE
Definition codeparser.h:15
#define COMMAND_INGROUP
Definition codeparser.h:29
#define COMMAND_QMLTYPE
Definition codeparser.h:66
#define COMMAND_QMLATTACHEDMETHOD
Definition codeparser.h:49
#define COMMAND_SUBTITLE
Definition codeparser.h:75
#define COMMAND_QMLATTACHEDSIGNAL
Definition codeparser.h:51
static std::string comparisonCategoryAsString(ComparisonCategory category)
static ComparisonCategory comparisonCategoryFromString(const std::string &string)
#define CONFIG_SOURCES
Definition config.h:384
#define CONFIG_SINGLEEXEC
Definition config.h:381
#define CONFIG_VERSION
Definition config.h:394
#define CONFIG_EXAMPLEDIRS
Definition config.h:337
QMap< QString, ConfigVar > ConfigVarMap
Definition config.h:81
#define CONFIG_INDEXES
Definition config.h:358
#define CONFIG_DEFINES
Definition config.h:331
#define CONFIG_DEPENDS
Definition config.h:332
#define CONFIG_NOLINKERRORS
Definition config.h:369
#define CONFIG_LOGPROGRESS
Definition config.h:363
#define CONFIG_IMAGEDIRS
Definition config.h:355
#define CONFIG_PROJECT
Definition config.h:375
#define CONFIG_SOURCEDIRS
Definition config.h:382
#define CONFIG_HEADERS
Definition config.h:346
#define CONFIG_DOCUMENTATIONINHEADERS
Definition config.h:335
#define CONFIG_NAVIGATION
Definition config.h:368
#define CONFIG_LANDINGPAGE
Definition config.h:359
#define CONFIG_OUTPUTFORMATS
Definition config.h:371
#define CONFIG_LANDINGTITLE
Definition config.h:360
#define CONFIG_MODULEHEADER
Definition config.h:366
#define CONFIG_HEADERDIRS
Definition config.h:345
#define CONFIG_INCLUDEPATHS
Definition config.h:356
bool hasTooManyTopics(const Doc &doc)
Checks if there are too many topic commands in doc.
QList< Doc > DocList
Definition doc.h:89
Q_DECLARE_TYPEINFO(Doc, Q_RELOCATABLE_TYPE)
std::pair< QString, QString > ArgPair
Definition doc.h:26
QList< ArgPair > ArgList
Definition doc.h:27
QMultiMap< QString, QString > QStringMultiMap
Definition doc.h:28
QHash< QString, Macro > QHash_QString_Macro
QT_BEGIN_NAMESPACE typedef QHash< QString, int > QHash_QString_int
Q_DECLARE_TYPEINFO(Location, Q_COMPLEX_TYPE)
Q_DECLARE_TYPEINFO(Location::StackEntry, Q_RELOCATABLE_TYPE)
Combined button and popup list for selecting options.
This namespace holds QDoc-internal utility methods.
Definition utilities.h:15
bool debugging()
Definition utilities.cpp:38
QString comma(qsizetype wordPosition, qsizetype numberOfWords)
Definition utilities.cpp:72
QString separator(qsizetype wordPosition, qsizetype numberOfWords)
Definition utilities.cpp:52
QMultiMap< QString, CollectionNode * > CNMultiMap
Definition node.h:49
QList< Node * > NodeList
Definition node.h:41
QList< ClassNode * > ClassList
Definition node.h:42
QList< Node * > NodeVector
Definition node.h:43
QMap< QString, NodeMultiMap > NodeMultiMapMap
Definition node.h:47
QMap< QString, Node * > NodeMap
Definition node.h:44
QMap< QString, NodeMap > NodeMapMap
Definition node.h:45
QMap< QString, CollectionNode * > CNMap
Definition node.h:48
QMultiMap< QString, Node * > NodeMultiMap
Definition node.h:46
QList< Parameter > ParameterVector
Definition parameters.h:54
QT_BEGIN_NAMESPACE typedef QMultiMap< Text, const Node * > TextToNodeMap
FindFlag
@ SearchBaseClasses
@ SearchEnumValues
@ IgnoreModules
@ TypesOnly
QList< ImportRec > ImportList
Definition qmltypenode.h:19
std::optional< QString > formatStatus(const Node *node, QDocDatabase *qdb)
QT_BEGIN_NAMESPACE typedef QMultiMap< QString, Node * > NodeMultiMap
Definition generator.h:20
static void parseSourceFiles(std::vector< QString > &&sources, SourceFileParser &source_file_parser, CppCodeParser &cpp_code_parser)
Definition main.cpp:64
static void singleExecutionMode()
Definition main.cpp:652
void logStartEndMessage(const QLatin1String &startStop, Config &config)
Definition main.cpp:273
static void processQdocconfFile(const QString &fileName)
Processes the qdoc config file fileName.
Definition main.cpp:295
static void clearModuleDependenciesAndProcessQdocconfFile(const QStringList &qdocFiles)
Definition main.cpp:634
static void dualExecutionMode()
Definition main.cpp:669
bool creationTimeBefore(const QFileInfo &fi1, const QFileInfo &fi2)
Definition main.cpp:45
static void loadIndexFiles(const QSet< QString > &formats)
Read some XML indexes containing definitions from other documentation sets.
Definition main.cpp:121
#define QDOC_REFINED_TYPEDEF(_type, _name)
\macro QDOC_REFINED_TYPEDEF(_type, _name)
std::pair< const QmlTypeNode *, NodeVector > ClassNodes
Definition sections.h:13
QList< const Section * > SectionPtrVector
Definition sections.h:79
QList< Section > SectionVector
Definition sections.h:78
QList< ClassNodes > ClassNodesList
Definition sections.h:14
TaggedSourceFile tag_source_file(const QString &path)
static QString AUTOLINKERRORS
Definition config.h:242
static QString HEADERSTYLES
Definition config.h:266
static QString IGNORESINCE
Definition config.h:271
static QString CODESUFFIX
Definition config.h:246
static QString EXAMPLEDIRS
Definition config.h:255
static QString CODEINDENT
Definition config.h:244
static QString HEADERDIRS
Definition config.h:263
static QString HEADERS
Definition config.h:264
static QString NATURALLANGUAGE
Definition config.h:286
static QString WARNABOUTMISSINGPROJECTFILES
Definition config.h:320
static QString SINGLEEXEC
Definition config.h:300
static QString LANGUAGE
Definition config.h:280
static QString SOURCEDIRS
Definition config.h:301
static QString IGNOREDIRECTIVES
Definition config.h:269
static QString EXCLUDEDIRS
Definition config.h:258
static QString INCLUSIVE
Definition config.h:276
static QString FILEEXTENSIONS
Definition config.h:315
static QString OUTPUTFORMATS
Definition config.h:290
static QString REDIRECTDOCUMENTATIONTODEVNULL
Definition config.h:295
static QString LANDINGPAGE
Definition config.h:278
static QString SCRIPTS
Definition config.h:298
static QString QHP
Definition config.h:296
static QString MODULEHEADER
Definition config.h:285
static QString DEPENDS
Definition config.h:250
static QString VERSION
Definition config.h:313
static QString CPPCLASSESPAGE
Definition config.h:247
static QString MACRO
Definition config.h:283
static QString PRODUCTNAME
Definition config.h:293
static QString SOURCES
Definition config.h:303
static QString BUILDVERSION
Definition config.h:243
static QString DOCBOOKEXTENSIONS
Definition config.h:252
static QString VERSIONSYM
Definition config.h:314
static QString IMAGEEXTENSIONS
Definition config.h:316
static QString ENDHEADER
Definition config.h:254
static QString EXAMPLESINSTALLPATH
Definition config.h:257
static QString DEFINES
Definition config.h:249
static QString HEADERSCRIPTS
Definition config.h:265
static QString SOURCEENCODING
Definition config.h:302
static QString IGNORETOKENS
Definition config.h:270
static QString TAGFILE
Definition config.h:308
static QString IMAGEDIRS
Definition config.h:273
static QString NAVIGATION
Definition config.h:287
static QString SYNTAXHIGHLIGHTING
Definition config.h:306
static QString IGNOREWORDS
Definition config.h:272
static QString IMAGES
Definition config.h:274
static QString EXAMPLES
Definition config.h:256
static QString INCLUDEPATHS
Definition config.h:275
static QString WARNINGLIMIT
Definition config.h:321
static QString STYLESHEETS
Definition config.h:305
static QString LANDINGTITLE
Definition config.h:279
static QString CODEPREFIX
Definition config.h:245
static QString LOGPROGRESS
Definition config.h:282
static QString FALSEHOODS
Definition config.h:261
static QString HOMEPAGE
Definition config.h:267
static QString TRADEMARKSPAGE
Definition config.h:311
static QString QMLTYPESPAGE
Definition config.h:317
static QString SPURIOUS
Definition config.h:304
static QString INDEXES
Definition config.h:277
static QString OUTPUTDIR
Definition config.h:289
static QString EXCLUDEFILES
Definition config.h:259
static QString EXTRAIMAGES
Definition config.h:260
static QString TOCTITLES
Definition config.h:310
static QString NOLINKERRORS
Definition config.h:288
static QString LOCATIONINFO
Definition config.h:281
static QString TABSIZE
Definition config.h:307
static QString TIMESTAMPS
Definition config.h:309
static QString WARNABOUTMISSINGIMAGES
Definition config.h:319
static QString HOMETITLE
Definition config.h:268
static QString DOCUMENTATIONINHEADERS
Definition config.h:253
static QString SHOWINTERNAL
Definition config.h:299
static QString CPPCLASSESTITLE
Definition config.h:248
static QString QUOTINGINFORMATION
Definition config.h:297
static QString FORMATTING
Definition config.h:262
static QString PROJECT
Definition config.h:294
static QString MANIFESTMETA
Definition config.h:284
static QString OUTPUTPREFIXES
Definition config.h:291
static QString DESCRIPTION
Definition config.h:251
static QString OUTPUTSUFFIXES
Definition config.h:292
static QString URL
Definition config.h:312
static QString QMLTYPESTITLE
Definition config.h:318
QSet< QString > excluded_directories
Definition config.h:185
QSet< QString > excluded_files
Definition config.h:186
friend bool operator<(const HeaderFilePath &lhs, const HeaderFilePath &rhs)
Definition config.h:194
QHash_QString_Macro macroHash
QHash_QString_int cmdHash
QChar m_delim
Definition config.h:33
int m_valueIndex
Definition config.h:30
int m_index
Definition config.h:31
QString m_var
Definition config.h:32
FnCommandParser(QDocDatabase *qdb, const std::set< Config::HeaderFilePath > &all_headers, const QList< QByteArray > &defines, std::optional< std::reference_wrapper< const PCHFile > > pch)
std::variant< Node *, FnMatchError > operator()(const Location &location, const QString &fnSignature, const QString &idTag, QStringList context)
Use clang to parse the function signature from a function command.
Encapsulates information about.
Definition parsererror.h:13
Location location
Definition parsererror.h:15
QString signature
Definition parsererror.h:14
QString & version()
Definition importrec.h:29
QString m_importId
Definition importrec.h:19
QString & name()
Definition importrec.h:28
bool isEmpty() const
Definition importrec.h:30
QString m_importUri
Definition importrec.h:18
QString m_moduleName
Definition importrec.h:16
ImportRec(QString name, QString version, QString importUri, QStringView importId)
Definition importrec.h:21
QString m_majorMinorVersion
Definition importrec.h:17
Simple structure used by the Doc and DocParser classes.
Location m_defaultDefLocation
Definition macro.h:20
QMap< QString, QString > m_otherDefs
Definition macro.h:21
int numParams
Definition macro.h:22
QString m_defaultDef
Definition macro.h:19
QByteArray name
QTemporaryDir dir
Processes parser errors and outputs warnings for them.
Definition parsererror.h:20
void operator()(const FnMatchError &e) const
Generates a warning specific to FnMatchError.
QCommandLineOption noExamplesOption
QCommandLineOption redirectDocumentationToDevNullOption
QCommandLineOption outputFormatOption
QCommandLineOption prepareOption
QCommandLineOption showInternalOption
QCommandLineOption singleExecOption
QCommandLineOption useDocBookExtensions
QCommandLineOption autoLinkErrorsOption
QCommandLineOption highlightingOption
QCommandLineOption outputDirOption
QCommandLineOption atomsDumpOption
QCommandLineOption installDirOption
QCommandLineOption debugOption
QCommandLineOption timestampsOption
QCommandLineOption dependsOption
QCommandLineOption logProgressOption
QCommandLineOption indexDirOption
QCommandLineOption noLinkErrorsOption
QCommandLineOption includePathSystemOption
void process(const QStringList &arguments)
QCommandLineOption generateOption
QCommandLineOption includePathOption
QCommandLineOption frameworkOption
QCommandLineOption defineOption
A struct for indicating that a ClassNode is related in some way to another ClassNode.
Access m_access
ClassNode * m_node
RelatedClass(Access access, ClassNode *node)
This is the constructor used when the related class has been resolved.
RelatedClass(Access access, QStringList path)
RelatedClass()=default
The default constructor does nothing.
QStringList m_path
bool isPrivate() const
Returns true if this RelatedClass is marked as Access::Private.
ValuedDeclaration valued_declaration
std::optional< TemplateDeclarationStorage > template_declaration
std::string to_std_string() const
Represents a file that is reachable by QDoc based on its current configuration.
const QString & get_path() const
Returns a string representing the canonicalized path to the file that was resolved.
ResolvedFile(QString query, FilePath filepath)
Constructs an instance of this type from query and filepath.
const QString & get_query() const
Returns a string representing the user-inputted path that was used to resolve the file.
std::vector< TiedDocumentation > tied
std::vector< UntiedDocumentation > untied
A record of a linkable target within the documentation.
Definition tree.h:25
bool isEmpty() const
Definition tree.h:41
Node * m_node
Definition tree.h:44
Node::Genus genus() const
Definition tree.h:42
int m_priority
Definition tree.h:47
TargetType
A type of a linkable target record.
Definition tree.h:27
@ ContentsKeyword
Definition tree.h:27
@ Keyword
Definition tree.h:27
@ Unknown
Definition tree.h:27
@ Target
Definition tree.h:27
@ Contents
Definition tree.h:27
QString m_ref
Definition tree.h:45
TargetType m_type
Definition tree.h:46
std::vector< RelaxedTemplateParameter > parameters
Definition topic.h:9
QString m_topic
Definition topic.h:22
Topic(QString &t, QString a)
Definition topic.h:12
Topic()=default
QString m_args
Definition topic.h:23
~Topic()=default
bool isEmpty() const
Definition topic.h:15
void clear()
Definition topic.h:16
QStringList context
Definition codeparser.h:97
std::string to_std_string(PrintingPolicy policy=default_printing_policy()) const
static PrintingPolicy default_printing_policy()
bool are_template_declarations_substitutable(const TemplateDeclarationStorage &left, const TemplateDeclarationStorage &right)
bool operator!=(const Text &text1, const Text &text2)
Definition text.h:64
bool operator>=(const Text &text1, const Text &text2)
Definition text.h:80
bool operator<=(const Text &text1, const Text &text2)
Definition text.h:72
bool operator>(const Text &text1, const Text &text2)
Definition text.h:76
bool operator==(const Text &text1, const Text &text2)
Definition text.h:60
bool operator<(const Text &text1, const Text &text2)
Definition text.h:68
QList< Topic > TopicList
Definition topic.h:25
QMap< QString, QmlTypeNode * > QmlTypeMap
Definition tree.h:52
QMultiMap< QString, PageNode * > PageNodeMultiMap
Definition tree.h:51
QMultiMap< QString, TargetRec * > TargetMap
Definition tree.h:50
QMultiMap< QString, const ExampleNode * > ExampleNodeMap
Definition tree.h:53