Doc: Fixed QDoc's HTML generator to avoid creating blank pages.

-The qdb->findModule() call creates a module node even if the module
 name is empty. This creates the extra module.html pages in some
 doc projects.
-The fix is to create a condition for calling findModule()

Task-number: QTBUG-32990
Change-Id: I6c1d1c53f3814ea483df2cd05b8d39dc14b0fb7b
Reviewed-by: Martin Smith <martin.smith@digia.com>
bb10
Jerome Pasion 2013-09-03 15:57:49 +02:00 committed by The Qt Project
parent 096499f69a
commit b51b3e63a6
1 changed files with 9 additions and 8 deletions

View File

@ -1935,15 +1935,16 @@ void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker)
}
//add the QT variable to the map
DocNode * moduleNode = qdb_->findModule(classe->moduleName());
if (moduleNode && !moduleNode->qtVariable().isEmpty()) {
text.clear();
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_TELETYPE)
<< "QT += " + moduleNode->qtVariable()
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_TELETYPE);
requisites.insert(qtVariableText, text);
if (!classe->moduleName().isEmpty()) {
DocNode * moduleNode = qdb_->findModule(classe->moduleName());
if (moduleNode && !moduleNode->qtVariable().isEmpty()) {
text.clear();
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_TELETYPE)
<< "QT += " + moduleNode->qtVariable()
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_TELETYPE);
requisites.insert(qtVariableText, text);
}
}
}
if (!requisites.isEmpty()) {