9#include <QtCore/qset.h>
13#define COMMAND_ABSTRACT QLatin1String("abstract")
14#define COMMAND_CLASS QLatin1String("class")
15#define COMMAND_CMAKEPACKAGE QLatin1String("cmakepackage")
16#define COMMAND_CMAKECOMPONENT QLatin1String("cmakecomponent")
17#define COMMAND_CMAKETARGETITEM QLatin1String("cmaketargetitem")
18#define COMMAND_COMPARES QLatin1String("compares")
19#define COMMAND_COMPARESWITH QLatin1String("compareswith")
20#define COMMAND_DEFAULT QLatin1String("default")
21#define COMMAND_DEPRECATED QLatin1String("deprecated")
22#define COMMAND_DONTDOCUMENT QLatin1String("dontdocument")
23#define COMMAND_ENUM QLatin1String("enum")
24#define COMMAND_EXAMPLE QLatin1String("example")
25#define COMMAND_EXTERNALPAGE QLatin1String("externalpage")
26#define COMMAND_FN QLatin1String("fn")
27#define COMMAND_GROUP QLatin1String("group")
28#define COMMAND_HEADERFILE QLatin1String("headerfile")
29#define COMMAND_INGROUP QLatin1String("ingroup")
30#define COMMAND_INHEADERFILE QLatin1String("inheaderfile")
31#define COMMAND_INMODULE QLatin1String("inmodule")
32#define COMMAND_INPUBLICGROUP QLatin1String("inpublicgroup")
33#define COMMAND_INQMLMODULE QLatin1String("inqmlmodule")
34#define COMMAND_INTERNAL QLatin1String("internal")
35#define COMMAND_MACRO QLatin1String("macro")
36#define COMMAND_MODULE QLatin1String("module")
37#define COMMAND_MODULESTATE QLatin1String("modulestate")
38#define COMMAND_NAMESPACE QLatin1String("namespace")
39#define COMMAND_NEXTPAGE QLatin1String("nextpage")
40#define COMMAND_NOAUTOLIST QLatin1String("noautolist")
41#define COMMAND_NONREENTRANT QLatin1String("nonreentrant")
42#define COMMAND_OBSOLETE QLatin1String("obsolete")
43#define COMMAND_OVERLOAD QLatin1String("overload")
44#define COMMAND_PAGE QLatin1String("page")
45#define COMMAND_PRELIMINARY QLatin1String("preliminary")
46#define COMMAND_PREVIOUSPAGE QLatin1String("previouspage")
47#define COMMAND_PROPERTY QLatin1String("property")
48#define COMMAND_QMLABSTRACT QLatin1String("qmlabstract")
49#define COMMAND_QMLATTACHEDMETHOD QLatin1String("qmlattachedmethod")
50#define COMMAND_QMLATTACHEDPROPERTY QLatin1String("qmlattachedproperty")
51#define COMMAND_QMLATTACHEDSIGNAL QLatin1String("qmlattachedsignal")
52#define COMMAND_QMLVALUETYPE QLatin1String("qmlvaluetype")
53#define COMMAND_QMLCLASS QLatin1String("qmlclass")
54#define COMMAND_QMLDEFAULT QLatin1String("qmldefault")
55#define COMMAND_QMLENUMERATORSFROM QLatin1String("qmlenumeratorsfrom")
56#define COMMAND_QMLINHERITS QLatin1String("inherits")
57#define COMMAND_QMLINSTANTIATES QLatin1String("instantiates")
58#define COMMAND_QMLMETHOD QLatin1String("qmlmethod")
59#define COMMAND_QMLMODULE QLatin1String("qmlmodule")
60#define COMMAND_QMLNATIVETYPE QLatin1String("nativetype")
61#define COMMAND_QMLPROPERTY QLatin1String("qmlproperty")
62#define COMMAND_QMLPROPERTYGROUP QLatin1String("qmlpropertygroup")
63#define COMMAND_QMLREADONLY QLatin1String("readonly")
64#define COMMAND_QMLREQUIRED QLatin1String("required")
65#define COMMAND_QMLSIGNAL QLatin1String("qmlsignal")
66#define COMMAND_QMLTYPE QLatin1String("qmltype")
67#define COMMAND_QTCMAKEPACKAGE QLatin1String("qtcmakepackage")
68#define COMMAND_QTCMAKETARGETITEM QLatin1String("qtcmaketargetitem")
69#define COMMAND_QTVARIABLE QLatin1String("qtvariable")
70#define COMMAND_REENTRANT QLatin1String("reentrant")
71#define COMMAND_REIMP QLatin1String("reimp")
72#define COMMAND_RELATES QLatin1String("relates")
73#define COMMAND_SINCE QLatin1String("since")
74#define COMMAND_STRUCT QLatin1String("struct")
75#define COMMAND_SUBTITLE QLatin1String("subtitle")
76#define COMMAND_STARTPAGE QLatin1String("startpage")
77#define COMMAND_THREADSAFE QLatin1String("threadsafe")
78#define COMMAND_TITLE QLatin1String("title")
79#define COMMAND_TYPEALIAS QLatin1String("typealias")
80#define COMMAND_TYPEDEF QLatin1String("typedef")
81#define COMMAND_VARIABLE QLatin1String("variable")
82#define COMMAND_VERSION QLatin1String("version")
83#define COMMAND_UNION QLatin1String("union")
84#define COMMAND_WRAPPER QLatin1String("wrapper")
85#define COMMAND_ATTRIBUTION QLatin1String("attribution")
88#define COMMAND_QMLBASICTYPE QLatin1String("qmlbasictype")
132 static void setLink(
Node *node, Node::LinkType linkType,
const QString &arg);
140 static QList<CodeParser *> s_parsers;
int main(int argc, char *argv[])
[2]
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)
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
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
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.
bool asBool() const
Returns this config variable as a boolean.
The Config class contains the configuration variables for controlling how qdoc produces documentation...
const Location & location() const
const ExcludedPaths & getExcludedPaths()
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)
static void initialize(FileResolver &file_resolver)
static void terminate()
All the heap allocated variables are deleted.
Encapsulate the logic that QDoc uses to find files whose path is provided by the user and that are re...
HtmlGenerator(FileResolver &file_resolver)
The Location class provides a way to mark a location in a file.
static int exitCode()
Returns the error code QDoc should exit with; EXIT_SUCCESS or the number of documentation warnings if...
static void initialize()
Gets several parameters from the config, including tab size, program name, and a regular expression t...
Location()
Constructs an empty location.
static void terminate()
Apparently, all this does is delete the regular expression used for intercepting certain error messag...
This class represents a C++ namespace.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
LinkType
An unsigned char value that probably should be moved out of the Node base class.
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 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)
static void terminate()
The heap allocated variables are freed here.
WebXMLGenerator(FileResolver &file_resolver)
#define COMMAND_QMLINHERITS
#define COMMAND_MODULESTATE
#define COMMAND_NONREENTRANT
#define COMMAND_DEPRECATED
#define COMMAND_PRELIMINARY
#define COMMAND_CMAKETARGETITEM
#define COMMAND_REENTRANT
#define COMMAND_STARTPAGE
#define COMMAND_QMLDEFAULT
#define COMMAND_QMLABSTRACT
#define COMMAND_QTVARIABLE
#define COMMAND_QTCMAKEPACKAGE
#define COMMAND_NOAUTOLIST
#define COMMAND_QTCMAKETARGETITEM
#define COMMAND_THREADSAFE
#define COMMAND_CMAKECOMPONENT
#define COMMAND_QMLREADONLY
#define COMMAND_QMLENUMERATORSFROM
#define COMMAND_INPUBLICGROUP
#define COMMAND_QMLREQUIRED
#define COMMAND_ATTRIBUTION
#define COMMAND_INQMLMODULE
#define COMMAND_CMAKEPACKAGE
#define CONFIG_EXAMPLEDIRS
#define CONFIG_NOLINKERRORS
#define CONFIG_LOGPROGRESS
#define CONFIG_SOURCEDIRS
#define CONFIG_DOCUMENTATIONINHEADERS
#define CONFIG_NAVIGATION
#define CONFIG_LANDINGPAGE
#define CONFIG_OUTPUTFORMATS
#define CONFIG_LANDINGTITLE
#define CONFIG_MODULEHEADER
#define CONFIG_HEADERDIRS
#define CONFIG_INCLUDEPATHS
Combined button and popup list for selecting options.
This namespace holds QDoc-internal utility methods.
static void parseSourceFiles(std::vector< QString > &&sources, SourceFileParser &source_file_parser, CppCodeParser &cpp_code_parser)
static void singleExecutionMode()
void logStartEndMessage(const QLatin1String &startStop, Config &config)
static void processQdocconfFile(const QString &fileName)
Processes the qdoc config file fileName.
static void clearModuleDependenciesAndProcessQdocconfFile(const QStringList &qdocFiles)
static void dualExecutionMode()
bool creationTimeBefore(const QFileInfo &fi1, const QFileInfo &fi2)
static void loadIndexFiles(const QSet< QString > &formats)
Read some XML indexes containing definitions from other documentation sets.
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.
Processes parser errors and outputs warnings for them.