qdoc: Add CLI option to not generate example docs.
Change-Id: I059ae76430adada020d338905b39ba3089c89615 Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
parent
419b4abed6
commit
89be197b92
@ -148,6 +148,7 @@ QStringList MetaStack::getExpanded(const Location& location)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String(".");
|
QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String(".");
|
||||||
|
bool Config::generateExamples = true;
|
||||||
QString Config::overrideOutputDir;
|
QString Config::overrideOutputDir;
|
||||||
QSet<QString> Config::overrideOutputFormats;
|
QSet<QString> Config::overrideOutputFormats;
|
||||||
QMap<QString, QString> Config::extractedDirs;
|
QMap<QString, QString> Config::extractedDirs;
|
||||||
|
@ -110,6 +110,7 @@ public:
|
|||||||
|
|
||||||
QT_STATIC_CONST QString dot;
|
QT_STATIC_CONST QString dot;
|
||||||
|
|
||||||
|
static bool generateExamples;
|
||||||
static QString overrideOutputDir;
|
static QString overrideOutputDir;
|
||||||
static QSet<QString> overrideOutputFormats;
|
static QSet<QString> overrideOutputFormats;
|
||||||
|
|
||||||
|
@ -684,9 +684,11 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
else if (command == COMMAND_EXAMPLE) {
|
else if (command == COMMAND_EXAMPLE) {
|
||||||
ExampleNode* en = new ExampleNode(tre->root(), arg);
|
if (Config::generateExamples) {
|
||||||
createExampleFileNodes(en);
|
ExampleNode* en = new ExampleNode(tre->root(), arg);
|
||||||
return en;
|
createExampleFileNodes(en);
|
||||||
|
return en;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (command == COMMAND_EXTERNALPAGE) {
|
else if (command == COMMAND_EXTERNALPAGE) {
|
||||||
return new FakeNode(tre->root(), arg, Node::ExternalPage, Node::ArticlePage);
|
return new FakeNode(tre->root(), arg, Node::ExternalPage, Node::ArticlePage);
|
||||||
|
@ -108,22 +108,24 @@ static void printHelp()
|
|||||||
{
|
{
|
||||||
Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
|
Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -help "
|
|
||||||
"Display this information and exit\n"
|
|
||||||
" -version "
|
|
||||||
"Display version of qdoc and exit\n"
|
|
||||||
" -D<name> "
|
" -D<name> "
|
||||||
"Define <name> as a macro while parsing sources\n"
|
"Define <name> as a macro while parsing sources\n"
|
||||||
|
" -help "
|
||||||
|
"Display this information and exit\n"
|
||||||
" -highlighting "
|
" -highlighting "
|
||||||
"Turn on syntax highlighting (makes qdoc run slower)\n"
|
"Turn on syntax highlighting (makes qdoc run slower)\n"
|
||||||
" -showinternal "
|
" -no-examples "
|
||||||
"Include stuff marked internal\n"
|
"Do not generate documentation for examples"
|
||||||
" -obsoletelinks "
|
" -obsoletelinks "
|
||||||
"Report links from obsolete items to non-obsolete items\n"
|
"Report links from obsolete items to non-obsolete items\n"
|
||||||
" -outputdir "
|
" -outputdir "
|
||||||
"Specify output directory, overrides setting in qdocconf file\n"
|
"Specify output directory, overrides setting in qdocconf file\n"
|
||||||
" -outputformat "
|
" -outputformat "
|
||||||
"Specify output format, overrides setting in qdocconf file") );
|
"Specify output format, overrides setting in qdocconf file"
|
||||||
|
" -showinternal "
|
||||||
|
"Include content marked internal\n"
|
||||||
|
" -version "
|
||||||
|
"Display version of qdoc and exit\n") );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -427,6 +429,9 @@ int main(int argc, char **argv)
|
|||||||
else if (opt == "-showinternal") {
|
else if (opt == "-showinternal") {
|
||||||
showInternal = true;
|
showInternal = true;
|
||||||
}
|
}
|
||||||
|
else if (opt == "-no-examples") {
|
||||||
|
Config::generateExamples = false;
|
||||||
|
}
|
||||||
else if (opt == "-obsoletelinks") {
|
else if (opt == "-obsoletelinks") {
|
||||||
obsoleteLinks = true;
|
obsoleteLinks = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user