From b2fe71d1ee5c9b9c31c808dbdec42592a3ac9c55 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 24 Jan 2018 13:07:04 +0100 Subject: qdoc: Fix handling of shared comment nodes in generate phase Shared comments nodes were not detected and handled correctly in certain cases. This update fixes those problems to avoid trying to output documentation for the individual nodes, when they are sharing a comment. Only the shared comment node should cause documentation to be generated for the nodes sharing the comment. Change-Id: I4ad7afc0964b1b6836dd5a140aa874784974b139 Reviewed-by: Martin Smith --- src/qdoc/cppcodemarker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/qdoc/cppcodemarker.cpp') diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index cdaecebd9..5bd64ca87 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -678,7 +678,7 @@ QList
CppCodeMarker::sections(const Aggregate *inner, FunctionNode *func = static_cast(*r); if (func->isMacro()) insert(macros, *r, style, status); - else + else if (!func->isSharingComment()) insert(relatedNonMembers, *r, style, status); } else { @@ -700,8 +700,10 @@ QList
CppCodeMarker::sections(const Aggregate *inner, insert(memberVariables, *c, style, status); } else if ((*c)->isFunction()) { FunctionNode *function = static_cast(*c); - if (!function->hasAssociatedProperties() || !function->doc().isEmpty()) - insert(memberFunctions, function, style, status); + if (!function->isSharingComment()) { + if (!function->hasAssociatedProperties() || !function->doc().isEmpty()) + insert(memberFunctions, function, style, status); + } } else if ((*c)->isSharedCommentNode()) { SharedCommentNode *scn = static_cast(*c); if (!scn->doc().isEmpty()) -- cgit v1.2.1