From fd3976142ca2ec4fb555917cad92135a2070eb0b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 8 May 2017 10:48:15 +0200 Subject: qdoc: Better support for multi-\fn documentation blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/qdoc/cppcodemarker.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/qdoc/cppcodemarker.cpp') 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
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
CppCodeMarker::sections(const Aggregate *inner, } else if ((*c)->type() == Node::Function) { FunctionNode *function = static_cast(*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(*c); + if (!scn->doc().isEmpty()) + insert(memberFunctions, scn, style, status); } ++c; } -- cgit v1.2.1