diff options
author | Martin Smith <martin.smith@qt.io> | 2018-01-24 13:07:04 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-01-26 10:06:16 +0000 |
commit | b2fe71d1ee5c9b9c31c808dbdec42592a3ac9c55 (patch) | |
tree | 23efa1facb2fff94943b9b981e507013518a4e89 /src/qdoc/cppcodemarker.cpp | |
parent | b02913d943a36d1cb1142b2fe9d94b90cc3a63a9 (diff) | |
download | qttools-b2fe71d1ee5c9b9c31c808dbdec42592a3ac9c55.tar.gz |
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 <martin.smith@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/qdoc/cppcodemarker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<Section> CppCodeMarker::sections(const Aggregate *inner, FunctionNode *func = static_cast<FunctionNode *>(*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<Section> CppCodeMarker::sections(const Aggregate *inner, insert(memberVariables, *c, style, status); } else if ((*c)->isFunction()) { FunctionNode *function = static_cast<FunctionNode *>(*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<SharedCommentNode *>(*c); if (!scn->doc().isEmpty()) |