diff options
author | Martin Smith <martin.smith@digia.com> | 2015-07-02 12:11:51 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2015-07-07 12:59:09 +0000 |
commit | 14773459908d95fffaad52c2891fae1d2cf02c7c (patch) | |
tree | fcc656a097523ad0bc632f0ee7da563f62c51c31 /src | |
parent | 0e16b6b598f1964d8baaec81c05d0afa6e9e89c6 (diff) |
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 <martin.smith@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 1b18892e93..cab416370a 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()); |