qdoc: Don't try to output from index nodes

When qdoc traverses its internal node tree to generate
either the html docs or the help file, it no longer
traverses nodes that were added to the tree as the result
of reading an index file.

Task-number: QTBUG-32622
Change-Id: Iac63ac2ce177b15b85a2aa73850c45891cbbc624
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Martin Smith 2013-07-25 11:38:17 +02:00 committed by The Qt Project
parent 97378dc70e
commit 5ec0804583
2 changed files with 7 additions and 0 deletions

View File

@ -945,6 +945,8 @@ void Generator::generateInnerNode(InnerNode* node)
{
if (!node->url().isNull())
return;
if (node->isIndexNode())
return;
if (node->type() == Node::Document) {
DocNode* docNode = static_cast<DocNode*>(node);

View File

@ -422,6 +422,11 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
void HelpProjectWriter::generateSections(HelpProject &project,
QXmlStreamWriter &writer, const Node *node)
{
/*
Don't include index nodes in the help file. Or DITA map nodes.
*/
if (node->isIndexNode() || node->subType() == Node::DitaMap)
return;
if (!generateSection(project, writer, node))
return;