diff options
author | Martin Smith <martin.smith@qt.io> | 2017-05-08 10:48:15 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-08-10 07:35:38 +0000 |
commit | fd3976142ca2ec4fb555917cad92135a2070eb0b (patch) | |
tree | 9b19ca7caa966ff69aa45ab42ca410b5af2b7af5 /src/qdoc/cppcodemarker.cpp | |
parent | da183316a39979f42070759eecb9062fcf240ac5 (diff) | |
download | qttools-fd3976142ca2ec4fb555917cad92135a2070eb0b.tar.gz |
qdoc: Better support for multi-\fn documentation blocks
This change is a partial fix for the multi-\fn documentation concept.
It outputs the documentation once but listing all the function signatures
from the \fn commands found in the qdoc comment.
Multiple \since commands are not implemented; the \until command is not
implemented, and providing text applicable to a specific \fn signature is
not implemented.
This change requires clang, which means it requires a sequence of other
updates as well, so you can't test it unless you have all that stuff.
Task-number: QTBUG-60420
Change-Id: Ib316b6f97fa427ef730c4badfc785101bff55dce
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/qdoc/cppcodemarker.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index 0f1137fa8..8234f8676 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -590,7 +590,7 @@ QList<Section> CppCodeMarker::sections(const Aggregate *inner, insert(publicFunctions, *c, style, status); } } - else { + else if ((*c)->type() != Node::SharedComment) { insert(publicTypes, *c, style, status); } break; @@ -702,8 +702,15 @@ QList<Section> CppCodeMarker::sections(const Aggregate *inner, } else if ((*c)->type() == Node::Function) { FunctionNode *function = static_cast<FunctionNode *>(*c); - if (!function->hasAssociatedProperties() || !function->doc().isEmpty()) - insert(memberFunctions, function, style, status); + if (!function->isInCollective()) { + if (!function->hasAssociatedProperties() || !function->doc().isEmpty()) + insert(memberFunctions, function, style, status); + } + } + else if ((*c)->type() == Node::SharedComment) { + SharedCommentNode *scn = static_cast<SharedCommentNode *>(*c); + if (!scn->doc().isEmpty()) + insert(memberFunctions, scn, style, status); } ++c; } |