11QDocCommandLineParser::QDocCommandLineParser()
12 : QCommandLineParser(),
13 defineOption(QStringList() << QStringLiteral(
"D")),
14 dependsOption(QStringList() << QStringLiteral(
"depends")),
15 highlightingOption(QStringList() << QStringLiteral(
"highlighting")),
16 showInternalOption(QStringList() << QStringLiteral(
"showinternal")),
17 redirectDocumentationToDevNullOption(QStringList()
18 << QStringLiteral(
"redirect-documentation-to-dev-null")),
19 noExamplesOption(QStringList() << QStringLiteral(
"no-examples")),
20 indexDirOption(QStringList() << QStringLiteral(
"indexdir")),
21 installDirOption(QStringList() << QStringLiteral(
"installdir")),
22 outputDirOption(QStringList() << QStringLiteral(
"outputdir")),
23 outputFormatOption(QStringList() << QStringLiteral(
"outputformat")),
24 noLinkErrorsOption(QStringList() << QStringLiteral(
"no-link-errors")),
25 autoLinkErrorsOption(QStringList() << QStringLiteral(
"autolink-errors")),
26 debugOption(QStringList() << QStringLiteral(
"debug")),
27 atomsDumpOption(
"atoms-dump"),
28 prepareOption(QStringList() << QStringLiteral(
"prepare")),
29 generateOption(QStringList() << QStringLiteral(
"generate")),
30 logProgressOption(QStringList() << QStringLiteral(
"log-progress")),
31 singleExecOption(QStringList() << QStringLiteral(
"single-exec")),
32 includePathOption(
"I",
"Add dir to the include path for header files.",
"path"),
33 includePathSystemOption(
"isystem",
"Add dir to the system include path for header files.",
35 frameworkOption(
"F",
"Add macOS framework to the include path for header files.",
37 timestampsOption(QStringList() << QStringLiteral(
"timestamps")),
38 useDocBookExtensions(QStringList() << QStringLiteral(
"docbook-extensions"))
40 setApplicationDescription(QStringLiteral(
"Qt documentation generator"));
44 setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
46 addPositionalArgument(
"file1.qdocconf ...", QStringLiteral(
"Input files"));
48 defineOption.setDescription(
49 QStringLiteral(
"Define the argument as a macro while parsing sources"));
50 defineOption.setValueName(QStringLiteral(
"macro[=def]"));
51 defineOption.setFlags(QCommandLineOption::ShortOptionStyle);
52 addOption(defineOption);
54 dependsOption.setDescription(QStringLiteral(
"Specify dependent modules"));
55 dependsOption.setValueName(QStringLiteral(
"module"));
56 addOption(dependsOption);
58 highlightingOption.setDescription(
59 QStringLiteral(
"Turn on syntax highlighting (makes qdoc run slower)"));
60 addOption(highlightingOption);
62 showInternalOption.setDescription(QStringLiteral(
"Include content marked internal"));
63 addOption(showInternalOption);
65 redirectDocumentationToDevNullOption.setDescription(
66 QStringLiteral(
"Save all documentation content to /dev/null. "
67 " Useful if someone is interested in qdoc errors only."));
68 addOption(redirectDocumentationToDevNullOption);
70 noExamplesOption.setDescription(QStringLiteral(
"Do not generate documentation for examples"));
71 addOption(noExamplesOption);
73 indexDirOption.setDescription(
74 QStringLiteral(
"Specify a directory where QDoc should search for index files to load"));
75 indexDirOption.setValueName(QStringLiteral(
"dir"));
76 addOption(indexDirOption);
78 installDirOption.setDescription(QStringLiteral(
79 "Specify the directory where the output will be after running \"make install\""));
80 installDirOption.setValueName(QStringLiteral(
"dir"));
81 addOption(installDirOption);
83 outputDirOption.setDescription(
84 QStringLiteral(
"Specify output directory, overrides setting in qdocconf file"));
85 outputDirOption.setValueName(QStringLiteral(
"dir"));
86 addOption(outputDirOption);
88 outputFormatOption.setDescription(
89 QStringLiteral(
"Specify output format, overrides setting in qdocconf file"));
90 outputFormatOption.setValueName(QStringLiteral(
"format"));
91 addOption(outputFormatOption);
93 noLinkErrorsOption.setDescription(
94 QStringLiteral(
"Do not print link errors (i.e. missing targets)"));
95 addOption(noLinkErrorsOption);
97 autoLinkErrorsOption.setDescription(QStringLiteral(
"Show errors when automatic linking fails"));
98 addOption(autoLinkErrorsOption);
100 debugOption.setDescription(QStringLiteral(
"Enable debug output"));
101 addOption(debugOption);
103 atomsDumpOption.setDescription(QStringLiteral(
104 "Shows a human-readable form of the intermediate result of parsing a block-comment."));
105 addOption(atomsDumpOption);
107 prepareOption.setDescription(
108 QStringLiteral(
"Run qdoc only to generate an index file, not the docs"));
109 addOption(prepareOption);
111 generateOption.setDescription(
112 QStringLiteral(
"Run qdoc to read the index files and generate the docs"));
113 addOption(generateOption);
115 logProgressOption.setDescription(QStringLiteral(
"Log progress on stderr."));
116 addOption(logProgressOption);
118 singleExecOption.setDescription(QStringLiteral(
"Run qdoc once over all the qdoc conf files."));
119 addOption(singleExecOption);
121 includePathOption.setFlags(QCommandLineOption::ShortOptionStyle);
122 addOption(includePathOption);
124 addOption(includePathSystemOption);
126 frameworkOption.setFlags(QCommandLineOption::ShortOptionStyle);
127 addOption(frameworkOption);
129 timestampsOption.setDescription(QStringLiteral(
"Timestamp each qdoc log line."));
130 addOption(timestampsOption);
132 useDocBookExtensions.setDescription(
133 QStringLiteral(
"Use the DocBook Library extensions for metadata."));
134 addOption(useDocBookExtensions);