summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/htmlgenerator.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-10-11 14:04:21 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-10-12 15:57:46 +0200
commit5a1e30df86bd54f0abe02bf369caa0a20912c9a4 (patch)
treee45fe6c4f609a80446c3a9d2527181ff27e33f82 /src/tools/qdoc/htmlgenerator.cpp
parent206f100a0d6761ebcfc4efdac19b860feecf3dbd (diff)
qdoc: qdoc now can run in 2 passes
Two command line options have been added, -prepare and -generate. If you run qdoc with -prepare, qdoc reads and parses the source files but does not generate the documentation. It only creates the .index file for the module you are running qdoc on. If you run qdoc with -generate, qdoc reads and parses the source files as well as the .index files created by running qdoc with -prepare, and it generates the documentation but no .index file. If you run without either option, qdoc runs as before, i.e. it runs both passes as a single pass. Task number: QTBUG-27539 Change-Id: Idbfe3f0f9dff58283596b504f00dff3f70f6e371 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/tools/qdoc/htmlgenerator.cpp')
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index a7721656f4..17dc40f08a 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -243,21 +243,27 @@ QString HtmlGenerator::format()
void HtmlGenerator::generateTree()
{
qdb_->buildCollections();
- Generator::generateTree();
- generateCollisionPages();
+ if (!runPrepareOnly()) {
+ Generator::generateTree();
+ generateCollisionPages();
+ }
- QString fileBase = project.toLower().simplified().replace(QLatin1Char(' '), QLatin1Char('-'));
- qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index",
- projectUrl,
- projectDescription,
- this);
+ if (!runGenerateOnly()) {
+ QString fileBase = project.toLower().simplified().replace(QLatin1Char(' '), QLatin1Char('-'));
+ qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index",
+ projectUrl,
+ projectDescription,
+ this);
+ }
- helpProjectWriter->generate();
- generateManifestFiles();
- /*
- Generate the XML tag file, if it was requested.
- */
- qdb_->generateTagFile(tagFile_, this);
+ if (!runPrepareOnly()) {
+ helpProjectWriter->generate();
+ generateManifestFiles();
+ /*
+ Generate the XML tag file, if it was requested.
+ */
+ qdb_->generateTagFile(tagFile_, this);
+ }
}
/*!