From 14773459908d95fffaad52c2891fae1d2cf02c7c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 2 Jul 2015 12:11:51 +0200 Subject: qdoc: Make private friend public A friend operator was declared as a friend in the private part of the class. qdoc thought this meant the operator should be private and therefore should not be documented. But the friend operator should be documented, despite being declared in the private part of the class. This update changes qdoc so that it always treats a friend as public. Change-Id: I7f8bcf0c0fdffd32f67041f7d1a03eefa2a8b924 Task-number: QTBUG-46983 Reviewed-by: Martin Smith --- src/tools/qdoc/cppcodeparser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/tools/qdoc/cppcodeparser.cpp') diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 1b18892e93b..cab416370a3 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -1585,7 +1585,13 @@ bool CppCodeParser::matchFunctionDecl(Aggregate *parent, bool createFunctionNode = false; if (parsingHeaderFile_) { if (matched_friend) { + if (matched_inline) { + // nothing yet + } if (body_present) { + if (body_expected) { + // nothing yet + } createFunctionNode = true; if (parent && parent->parent()) parent = parent->parent(); @@ -1601,6 +1607,8 @@ bool CppCodeParser::matchFunctionDecl(Aggregate *parent, if (createFunctionNode) { func = new FunctionNode(extra.type, parent, name, extra.isAttached); + if (matched_friend) + access = Node::Public; func->setAccess(access); func->setLocation(location()); func->setReturnType(returnType.toString()); -- cgit v1.2.3