diff options
author | Jerome Pasion <jerome.pasion@digia.com> | 2013-09-03 15:57:49 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-04 18:52:29 +0200 |
commit | b51b3e63a6754697bedea2097f02460fe9f475d0 (patch) | |
tree | 37d90b84c473f3b52ecf74b99858ed08d625bb02 /src/tools/qdoc/htmlgenerator.cpp | |
parent | 096499f69ac640c89a15e4473ee04578d35fc7b5 (diff) |
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>
Diffstat (limited to 'src/tools/qdoc/htmlgenerator.cpp')
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index f17e3adde8..2caa2f8332 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -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()) { |