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
config.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef CONFIG_H
5#define CONFIG_H
6
7#include "location.h"
9#include "singleton.h"
10
11#include <QtCore/qmap.h>
12#include <QtCore/qset.h>
13#include <QtCore/qstack.h>
14#include <QtCore/qstringlist.h>
15
16#include <set>
17#include <utility>
18
19QT_BEGIN_NAMESPACE
20
21class Config;
22
23/*
24 Contains information about a location
25 where a ConfigVar string needs to be expanded
26 from another config variable.
27*/
29{
31 int m_index {};
32 QString m_var {};
34
35 ExpandVar(int valueIndex, int index, QString var, const QChar &delim)
36 : m_valueIndex(valueIndex), m_index(index), m_var(std::move(var)), m_delim(delim)
37 {
38 }
39};
40
42{
43public:
44 struct ConfigValue {
45 QString m_value;
46 QString m_path;
47 };
48
49 [[nodiscard]] QString asString(const QString defaultString = QString()) const;
51 [[nodiscard]] QSet<QString> asStringSet() const;
52 [[nodiscard]] bool asBool() const;
53 [[nodiscard]] int asInt() const;
54 [[nodiscard]] const Location &location() const { return m_location; }
55
56 ConfigVar() = default;
57 ConfigVar(QString name, const QStringList &values, const QString &dir,
58 const Location &loc = Location(),
59 const QList<ExpandVar> &expandVars = QList<ExpandVar>())
60 : m_name(std::move(name)), m_location(loc), m_expandVars(expandVars)
61 {
62 for (const auto &v : values)
63 m_values << ConfigValue {v, dir};
64 }
65
66private:
67 void append(const ConfigVar &other);
68
69private:
70 QString m_name {};
71 QList<ConfigValue> m_values {};
72 Location m_location {};
73 QList<ExpandVar> m_expandVars {};
74
75 friend class Config;
76};
77
78/*
79 In this multimap, the key is a config variable name.
80 */
82
83class Config : public Singleton<Config>
84{
85public:
86 ~Config();
87
89
90 enum PathFlags : unsigned char {
91 None = 0x0,
92 // TODO: [unenforced-unclear-validation]
93 // The Validate flag is used, for example, during the retrival
94 // of paths in getCanonicalPathList.
95 // It is unclear what kind of validation it performs, if any,
96 // and when this validation is required.
97 // Instead, remove this kind of flag and ensure that any
98 // amount of required validation is performed during the
99 // parsing step, if possilbe, and only once.
100 // Furthemore, ensure any such validation removes some
101 // uncertainty on dependent subsystems, moving constraints to
102 // preconditions and expressing them at the API boundaries.
103 Validate = 0x1,
104 IncludePaths = 0x2
105 };
106
107 void init(const QString &programName, const QStringList &args);
108 [[nodiscard]] bool getDebug() const { return m_debug; }
109 [[nodiscard]] bool getAtomsDump() const { return m_atomsDump; }
110 [[nodiscard]] bool showInternal() const { return m_showInternal; }
111
112 void clear();
113 void reset();
114 void load(const QString &fileName);
115 void setStringList(const QString &var, const QStringList &values);
116 void insertStringList(const QString &var, const QStringList &values);
117
118 void showHelp(int exitCode = 0) { m_parser.showHelp(exitCode); }
119 [[nodiscard]] QStringList qdocFiles() const { return m_parser.positionalArguments(); }
120 [[nodiscard]] const QString &programName() const { return m_prog; }
121 [[nodiscard]] const Location &location() const { return m_location; }
122 [[nodiscard]] const ConfigVar &get(const QString &var) const
123 {
124 // Avoid injecting default-constructed values to map if var doesn't exist
125 static ConfigVar empty;
126 auto it = m_configVars.constFind(var);
127 return (it != m_configVars.constEnd()) ? *it : empty;
128 }
129 [[nodiscard]] QString getOutputDir(const QString &format = QString("HTML")) const;
131 [[nodiscard]] QStringList getCanonicalPathList(const QString &var,
132 PathFlags flags = None) const;
133 [[nodiscard]] QRegularExpression getRegExp(const QString &var) const;
134 [[nodiscard]] QList<QRegularExpression> getRegExpList(const QString &var) const;
135 [[nodiscard]] QSet<QString> subVars(const QString &var) const;
136 QStringList getAllFiles(const QString &filesVar, const QString &dirsVar,
137 const QSet<QString> &excludedDirs = QSet<QString>(),
138 const QSet<QString> &excludedFiles = QSet<QString>());
139 [[nodiscard]] QString getIncludeFilePath(const QString &fileName) const;
140 QStringList getExampleQdocFiles(const QSet<QString> &excludedDirs,
141 const QSet<QString> &excludedFiles);
142 QStringList getExampleImageFiles(const QSet<QString> &excludedDirs,
143 const QSet<QString> &excludedFiles);
144 QString getExampleProjectFile(const QString &examplePath);
145
146 static QStringList loadMaster(const QString &fileName);
147 static bool isFileExcluded(const QString &fileName, const QSet<QString> &excludedFiles);
148 static QStringList getFilesHere(const QString &dir, const QString &nameFilter,
149 const Location &location = Location(),
150 const QSet<QString> &excludedDirs = QSet<QString>(),
151 const QSet<QString> &excludedFiles = QSet<QString>());
152 static QString findFile(const Location &location, const QStringList &files,
153 const QStringList &dirs, const QString &fileName,
154 QString *userFriendlyFilePath = nullptr);
155 static QString copyFile(const Location &location, const QString &sourceFilePath,
156 const QString &userFriendlySourceFilePath,
157 const QString &targetDirPath);
158 static int numParams(const QString &value);
159 static void pushWorkingDir(const QString &dir);
160 static void popWorkingDir();
161
162 static const QString dot;
163
164 static bool generateExamples;
165 static QString installDir;
166 static QString overrideOutputDir;
168
169 [[nodiscard]] inline bool singleExec() const;
170 [[nodiscard]] inline bool dualExec() const;
171 QStringList &defines() { return m_defines; }
172 QStringList &dependModules() { return m_dependModules; }
173 QStringList &includePaths() { return m_includePaths; }
174 QStringList &indexDirs() { return m_indexDirs; }
175 [[nodiscard]] QString currentDir() const { return m_currentDir; }
176 void setCurrentDir(const QString &path) { m_currentDir = path; }
177 [[nodiscard]] QString previousCurrentDir() const { return m_previousCurrentDir; }
178 void setPreviousCurrentDir(const QString &path) { m_previousCurrentDir = path; }
179
180 void setQDocPass(const QDocPass &pass) { m_qdocPass = pass; };
181 [[nodiscard]] bool preparing() const { return (m_qdocPass == Prepare); }
182 [[nodiscard]] bool generating() const { return (m_qdocPass == Generate); }
183
189
191 QString path;
192 QString filename;
193
194 friend bool operator<(const HeaderFilePath& lhs, const HeaderFilePath& rhs) {
195 return std::tie(lhs.path, lhs.filename) < std::tie(rhs.path, rhs.filename);
196 }
197 };
199
200private:
201 void processCommandLineOptions(const QStringList &args);
202 void setIncludePaths();
203 void setIndexDirs();
204 void expandVariables();
205
206 QStringList m_dependModules {};
207 QStringList m_defines {};
208 QStringList m_includePaths {};
209 QStringList m_indexDirs {};
210 QStringList m_exampleFiles {};
211 QStringList m_exampleDirs {};
212 QString m_currentDir {};
213 QString m_previousCurrentDir {};
214 std::optional<ExcludedPaths> m_excludedPaths{};
215
216 bool m_showInternal { false };
217 static bool m_debug;
218
219 // An option that can be set trough a similarly named command-line option.
220 // When this is set, every time QDoc parses a block-comment, a
221 // human-readable presentation of the `Atom`s structure for that
222 // block will shown to the user.
223 static bool m_atomsDump;
224
225 static bool isMetaKeyChar(QChar ch);
226 void load(Location location, const QString &fileName);
227
228 QString m_prog {};
229 Location m_location {};
230 ConfigVarMap m_configVars {};
231
232 static QMap<QString, QString> m_extractedDirs;
233 static QStack<QString> m_workingDirs;
234 static QMap<QString, QStringList> m_includeFilesMap;
235 QDocCommandLineParser m_parser {};
236
237 QDocPass m_qdocPass { Neither };
238};
239
241{
242 static QString AUTOLINKERRORS;
243 static QString BUILDVERSION;
244 static QString CODEINDENT;
245 static QString CODEPREFIX;
246 static QString CODESUFFIX;
247 static QString CPPCLASSESPAGE;
248 static QString CPPCLASSESTITLE;
249 static QString DEFINES;
250 static QString DEPENDS;
251 static QString DESCRIPTION;
252 static QString DOCBOOKEXTENSIONS;
254 static QString ENDHEADER;
255 static QString EXAMPLEDIRS;
256 static QString EXAMPLES;
257 static QString EXAMPLESINSTALLPATH;
258 static QString EXCLUDEDIRS;
259 static QString EXCLUDEFILES;
260 static QString EXTRAIMAGES;
261 static QString FALSEHOODS;
262 static QString FORMATTING;
263 static QString HEADERDIRS;
264 static QString HEADERS;
265 static QString HEADERSCRIPTS;
266 static QString HEADERSTYLES;
267 static QString HOMEPAGE;
268 static QString HOMETITLE;
269 static QString IGNOREDIRECTIVES;
270 static QString IGNORETOKENS;
271 static QString IGNORESINCE;
272 static QString IGNOREWORDS;
273 static QString IMAGEDIRS;
274 static QString IMAGES;
275 static QString INCLUDEPATHS;
276 static QString INCLUSIVE;
277 static QString INDEXES;
278 static QString LANDINGPAGE;
279 static QString LANDINGTITLE;
280 static QString LANGUAGE;
281 static QString LOCATIONINFO;
282 static QString LOGPROGRESS;
283 static QString MACRO;
284 static QString MANIFESTMETA;
285 static QString MODULEHEADER;
286 static QString NATURALLANGUAGE;
287 static QString NAVIGATION;
288 static QString NOLINKERRORS;
289 static QString OUTPUTDIR;
290 static QString OUTPUTFORMATS;
291 static QString OUTPUTPREFIXES;
292 static QString OUTPUTSUFFIXES;
293 static QString PRODUCTNAME;
294 static QString PROJECT;
296 static QString QHP;
297 static QString QUOTINGINFORMATION;
298 static QString SCRIPTS;
299 static QString SHOWINTERNAL;
300 static QString SINGLEEXEC;
301 static QString SOURCEDIRS;
302 static QString SOURCEENCODING;
303 static QString SOURCES;
304 static QString SPURIOUS;
305 static QString STYLESHEETS;
306 static QString SYNTAXHIGHLIGHTING;
307 static QString TABSIZE;
308 static QString TAGFILE;
309 static QString TIMESTAMPS;
310 static QString TOCTITLES;
311 static QString TRADEMARKSPAGE;
312 static QString URL;
313 static QString VERSION;
314 static QString VERSIONSYM;
315 static QString FILEEXTENSIONS;
316 static QString IMAGEEXTENSIONS;
317 static QString QMLTYPESPAGE;
318 static QString QMLTYPESTITLE;
321 static QString WARNINGLIMIT;
322};
323
324#define CONFIG_AUTOLINKERRORS ConfigStrings::AUTOLINKERRORS
325#define CONFIG_BUILDVERSION ConfigStrings::BUILDVERSION
326#define CONFIG_CODEINDENT ConfigStrings::CODEINDENT
327#define CONFIG_CODEPREFIX ConfigStrings::CODEPREFIX
328#define CONFIG_CODESUFFIX ConfigStrings::CODESUFFIX
329#define CONFIG_CPPCLASSESPAGE ConfigStrings::CPPCLASSESPAGE
330#define CONFIG_CPPCLASSESTITLE ConfigStrings::CPPCLASSESTITLE
331#define CONFIG_DEFINES ConfigStrings::DEFINES
332#define CONFIG_DEPENDS ConfigStrings::DEPENDS
333#define CONFIG_DESCRIPTION ConfigStrings::DESCRIPTION
334#define CONFIG_DOCBOOKEXTENSIONS ConfigStrings::DOCBOOKEXTENSIONS
335#define CONFIG_DOCUMENTATIONINHEADERS ConfigStrings::DOCUMENTATIONINHEADERS
336#define CONFIG_ENDHEADER ConfigStrings::ENDHEADER
337#define CONFIG_EXAMPLEDIRS ConfigStrings::EXAMPLEDIRS
338#define CONFIG_EXAMPLES ConfigStrings::EXAMPLES
339#define CONFIG_EXAMPLESINSTALLPATH ConfigStrings::EXAMPLESINSTALLPATH
340#define CONFIG_EXCLUDEDIRS ConfigStrings::EXCLUDEDIRS
341#define CONFIG_EXCLUDEFILES ConfigStrings::EXCLUDEFILES
342#define CONFIG_EXTRAIMAGES ConfigStrings::EXTRAIMAGES
343#define CONFIG_FALSEHOODS ConfigStrings::FALSEHOODS
344#define CONFIG_FORMATTING ConfigStrings::FORMATTING
345#define CONFIG_HEADERDIRS ConfigStrings::HEADERDIRS
346#define CONFIG_HEADERS ConfigStrings::HEADERS
347#define CONFIG_HEADERSCRIPTS ConfigStrings::HEADERSCRIPTS
348#define CONFIG_HEADERSTYLES ConfigStrings::HEADERSTYLES
349#define CONFIG_HOMEPAGE ConfigStrings::HOMEPAGE
350#define CONFIG_HOMETITLE ConfigStrings::HOMETITLE
351#define CONFIG_IGNOREDIRECTIVES ConfigStrings::IGNOREDIRECTIVES
352#define CONFIG_IGNORESINCE ConfigStrings::IGNORESINCE
353#define CONFIG_IGNORETOKENS ConfigStrings::IGNORETOKENS
354#define CONFIG_IGNOREWORDS ConfigStrings::IGNOREWORDS
355#define CONFIG_IMAGEDIRS ConfigStrings::IMAGEDIRS
356#define CONFIG_INCLUDEPATHS ConfigStrings::INCLUDEPATHS
357#define CONFIG_INCLUSIVE ConfigStrings::INCLUSIVE
358#define CONFIG_INDEXES ConfigStrings::INDEXES
359#define CONFIG_LANDINGPAGE ConfigStrings::LANDINGPAGE
360#define CONFIG_LANDINGTITLE ConfigStrings::LANDINGTITLE
361#define CONFIG_LANGUAGE ConfigStrings::LANGUAGE
362#define CONFIG_LOCATIONINFO ConfigStrings::LOCATIONINFO
363#define CONFIG_LOGPROGRESS ConfigStrings::LOGPROGRESS
364#define CONFIG_MACRO ConfigStrings::MACRO
365#define CONFIG_MANIFESTMETA ConfigStrings::MANIFESTMETA
366#define CONFIG_MODULEHEADER ConfigStrings::MODULEHEADER
367#define CONFIG_NATURALLANGUAGE ConfigStrings::NATURALLANGUAGE
368#define CONFIG_NAVIGATION ConfigStrings::NAVIGATION
369#define CONFIG_NOLINKERRORS ConfigStrings::NOLINKERRORS
370#define CONFIG_OUTPUTDIR ConfigStrings::OUTPUTDIR
371#define CONFIG_OUTPUTFORMATS ConfigStrings::OUTPUTFORMATS
372#define CONFIG_OUTPUTPREFIXES ConfigStrings::OUTPUTPREFIXES
373#define CONFIG_OUTPUTSUFFIXES ConfigStrings::OUTPUTSUFFIXES
374#define CONFIG_PRODUCTNAME ConfigStrings::PRODUCTNAME
375#define CONFIG_PROJECT ConfigStrings::PROJECT
376#define CONFIG_REDIRECTDOCUMENTATIONTODEVNULL ConfigStrings::REDIRECTDOCUMENTATIONTODEVNULL
377#define CONFIG_QHP ConfigStrings::QHP
378#define CONFIG_QUOTINGINFORMATION ConfigStrings::QUOTINGINFORMATION
379#define CONFIG_SCRIPTS ConfigStrings::SCRIPTS
380#define CONFIG_SHOWINTERNAL ConfigStrings::SHOWINTERNAL
381#define CONFIG_SINGLEEXEC ConfigStrings::SINGLEEXEC
382#define CONFIG_SOURCEDIRS ConfigStrings::SOURCEDIRS
383#define CONFIG_SOURCEENCODING ConfigStrings::SOURCEENCODING
384#define CONFIG_SOURCES ConfigStrings::SOURCES
385#define CONFIG_SPURIOUS ConfigStrings::SPURIOUS
386#define CONFIG_STYLESHEETS ConfigStrings::STYLESHEETS
387#define CONFIG_SYNTAXHIGHLIGHTING ConfigStrings::SYNTAXHIGHLIGHTING
388#define CONFIG_TABSIZE ConfigStrings::TABSIZE
389#define CONFIG_TAGFILE ConfigStrings::TAGFILE
390#define CONFIG_TIMESTAMPS ConfigStrings::TIMESTAMPS
391#define CONFIG_TOCTITLES ConfigStrings::TOCTITLES
392#define CONFIG_TRADEMARKSPAGE ConfigStrings::TRADEMARKSPAGE
393#define CONFIG_URL ConfigStrings::URL
394#define CONFIG_VERSION ConfigStrings::VERSION
395#define CONFIG_VERSIONSYM ConfigStrings::VERSIONSYM
396#define CONFIG_FILEEXTENSIONS ConfigStrings::FILEEXTENSIONS
397#define CONFIG_IMAGEEXTENSIONS ConfigStrings::IMAGEEXTENSIONS
398#define CONFIG_QMLTYPESPAGE ConfigStrings::QMLTYPESPAGE
399#define CONFIG_QMLTYPESTITLE ConfigStrings::QMLTYPESTITLE
400#define CONFIG_WARNABOUTMISSINGIMAGES ConfigStrings::WARNABOUTMISSINGIMAGES
401#define CONFIG_WARNABOUTMISSINGPROJECTFILES ConfigStrings::WARNABOUTMISSINGPROJECTFILES
402#define CONFIG_WARNINGLIMIT ConfigStrings::WARNINGLIMIT
403
404inline bool Config::singleExec() const
405{
406 return m_configVars.value(CONFIG_SINGLEEXEC).asBool();
407}
408
409inline bool Config::dualExec() const
410{
411 return !m_configVars.value(CONFIG_SINGLEEXEC).asBool();
412}
413
414QT_END_NAMESPACE
415
416#endif
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
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
static void initialize()
All the code markers in the static list are initialized here, after the qdoc configuration file has b...
static void terminate()
All the code markers in the static list are terminated here.
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
CppCodeParser(FnCommandParser &&parser)
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...
DocBookGenerator(FileResolver &file_resolver)
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
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.
static void initialize()
static void terminate()
HtmlGenerator(FileResolver &file_resolver)
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
This class represents a C++ namespace.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
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
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.
PureDocParser(const Location &location)
This class provides exclusive access to the qdoc database, which consists of a forrest of trees and a...
static void destroyQdocDB()
Destroys the singleton.
static QDocDatabase * qdocDB()
Creates the singleton.
NamespaceNode * primaryTreeRoot()
Returns a pointer to the root node of the primary tree.
void processForest()
This function calls a set of functions for each tree in the forest that has not already been analyzed...
void clearSearchOrder()
void resolveStuff()
Performs several housekeeping tasks prior to generating the documentation.
static void terminate()
Clear the static maps so that subsequent runs don't try to use contents from a previous run.
SourceFileParser(ClangCodeParser &clang_parser, PureDocParser &pure_parser)
Definition text.h:12
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
WebXMLGenerator(FileResolver &file_resolver)
#define COMMAND_QMLINHERITS
Definition codeparser.h:56
#define COMMAND_MODULESTATE
Definition codeparser.h:37
#define COMMAND_INTERNAL
Definition codeparser.h:34
#define COMMAND_NONREENTRANT
Definition codeparser.h:41
#define COMMAND_OBSOLETE
Definition codeparser.h:42
#define COMMAND_INMODULE
Definition codeparser.h:31
#define COMMAND_DEPRECATED
Definition codeparser.h:21
#define COMMAND_PRELIMINARY
Definition codeparser.h:45
#define COMMAND_WRAPPER
Definition codeparser.h:84
#define COMMAND_CMAKETARGETITEM
Definition codeparser.h:17
#define COMMAND_REENTRANT
Definition codeparser.h:70
#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_QTVARIABLE
Definition codeparser.h:69
#define COMMAND_QTCMAKEPACKAGE
Definition codeparser.h:67
#define COMMAND_NOAUTOLIST
Definition codeparser.h:40
#define COMMAND_QTCMAKETARGETITEM
Definition codeparser.h:68
#define COMMAND_DEFAULT
Definition codeparser.h:20
#define COMMAND_THREADSAFE
Definition codeparser.h:77
#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_ATTRIBUTION
Definition codeparser.h:85
#define COMMAND_INQMLMODULE
Definition codeparser.h:33
#define COMMAND_CMAKEPACKAGE
Definition codeparser.h:15
#define COMMAND_INGROUP
Definition codeparser.h:29
#define COMMAND_SUBTITLE
Definition codeparser.h:75
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
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
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
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)
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.
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< 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)
QList< Topic > TopicList
Definition topic.h:25