diff options
author | Martin Smith <martin.smith@digia.com> | 2015-04-14 11:27:59 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2015-04-16 09:36:39 +0000 |
commit | aea74dcaee2d6930e4d69cbda83088703b45816e (patch) | |
tree | b7b6854656861cc758b4a573ea1ad8bcddf9bafd /src/tools/qdoc/htmlgenerator.cpp | |
parent | 528279febe74a5e995589d9c5eeb6c533cc2fe7c (diff) |
qdoc: Properly document "private" signals
When a signal declaration is marked with QSignalPrivate,
This note is included in its documentation: "Note: This
is a private signal. It must not be emitted by the user."
For Notifier signals, [see note] is appended to the signature line,
and the Note is printed below the list.
Change-Id: Ie792894ace56cda47fd9a45af9c732f408ac45f6
Task-number: QTBUG-45535
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/htmlgenerator.cpp')
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index f315099f18..f0a23ac65e 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -3265,6 +3265,7 @@ void HtmlGenerator::generateSectionList(const Section& section, { bool alignNames = true; if (!section.members.isEmpty()) { + bool hasPrivateSignals = false; bool twoColumn = false; if (style == CodeMarker::Subpage) { alignNames = false; @@ -3307,6 +3308,14 @@ void HtmlGenerator::generateSectionList(const Section& section, prefix = prefix.left(section.keys.at(i).indexOf("::")+1); } generateSynopsis(*m, relative, marker, style, alignNames, &prefix); + if ((*m)->isFunction()) { + const FunctionNode* fn = static_cast<const FunctionNode*>(*m); + if (fn->isPrivateSignal()) { + hasPrivateSignals = true; + if (alignNames) + out() << "</td><td class=\"memItemRight bottomAlign\">[see note below]"; + } + } if (alignNames) out() << "</td></tr>\n"; else @@ -3321,6 +3330,9 @@ void HtmlGenerator::generateSectionList(const Section& section, if (twoColumn) out() << "</td></tr>\n</table></div>\n"; } + if (hasPrivateSignals && alignNames) { + generatePrivateSignalNote(relative, marker); + } } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -4023,6 +4035,11 @@ void HtmlGenerator::generateDetailedMember(const Node *node, generateSectionList(notifiers, node, marker, CodeMarker::Accessors); } } + else if (node->isFunction()) { + const FunctionNode* fn = static_cast<const FunctionNode*>(node); + if (fn->isPrivateSignal()) + generatePrivateSignalNote(node, marker); + } else if (node->type() == Node::Enum) { const EnumNode *enume = static_cast<const EnumNode *>(node); if (enume->flagsType()) { |