qdoc: Stop outputting duplicate \brief for QML type and module pages

When generating the body of a documentation page, QDoc omits
the brief description for nodes of type DocNode. Since Qt 5.4,
a number of nodes are promoted from subnode types of DocNode
to top-level nodes -specifically,
    - QML types
    - Modules
    - QML modules
    - Groups

As a result we now see a duplicate or unintentional brief
description on pages of the above type.

This change instructs qdoc to skip generation of the brief
for also above node types, as it was on 5.3.

Task-number: QTBUG-40741
Change-Id: Id92dce27b13c68be0958225e04ed61813fdc91ee
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
Topi Reinio 2014-08-12 14:26:51 +02:00 committed by Topi Reiniö
parent 8f8c7e8a2b
commit d06c060de4

View File

@ -342,8 +342,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
case Atom::BaseName:
break;
case Atom::BriefLeft:
//do not output the brief for QML basic types and doc nodes (including examples).
if (relative->isQmlBasicType() || relative->isDocNode()) {
// Do not output the brief for QML nodes, doc nodes or collections
// (groups, modules, qml module nodes)
if (relative->isQmlType() || relative->isDocNode() || relative->isCollectionNode()) {
skipAhead = skipAtoms(atom, Atom::BriefRight);
break;
}