diff options
author | Martin Smith <martin.smith@nokia.com> | 2011-08-18 11:33:03 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2011-08-18 11:33:03 (GMT) |
commit | 7ca3a7e431e53250446c1b3f95db344e6b183f89 (patch) | |
tree | bad79b62a858737bc309d4ad2e6f9019a16ad35e /tools | |
parent | a9b6b923ab870ece76891c5330fdba26ce1bf613 (diff) | |
download | Qt-7ca3a7e431e53250446c1b3f95db344e6b183f89.zip Qt-7ca3a7e431e53250446c1b3f95db344e6b183f89.tar.gz Qt-7ca3a7e431e53250446c1b3f95db344e6b183f89.tar.bz2 |
qdoc3: Updates for QTBUG-20776; clear map between runs.
Task-number: QTBUG-20776
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c0a32d8..9846eb9 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4409,6 +4409,7 @@ void HtmlGenerator::generateManifestFiles() { generateManifestFile("examples", "example"); generateManifestFile("demos", "demo"); + ExampleNode::exampleNodeMap.clear(); } /*! @@ -4428,6 +4429,25 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) if (manifest == "demos") demos = true; + bool proceed = false; + ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); + while (i != ExampleNode::exampleNodeMap.end()) { + const ExampleNode* en = i.value(); + if (demos) { + if (en->name().startsWith("demos")) { + proceed = true; + break; + } + } + else if (!en->name().startsWith("demos")) { + proceed = true; + break; + } + ++i; + } + if (!proceed) + return; + QXmlStreamWriter writer(&file); writer.setAutoFormatting(true); writer.writeStartDocument(); @@ -4435,7 +4455,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) writer.writeAttribute("module", project); writer.writeStartElement(manifest); - ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); + i = ExampleNode::exampleNodeMap.begin(); while (i != ExampleNode::exampleNodeMap.end()) { const ExampleNode* en = i.value(); if (demos) { |