summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/generator.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-04-14 11:27:59 +0200
committerMartin Smith <martin.smith@digia.com>2015-04-16 09:36:39 +0000
commitaea74dcaee2d6930e4d69cbda83088703b45816e (patch)
treeb7b6854656861cc758b4a573ea1ad8bcddf9bafd /src/tools/qdoc/generator.cpp
parent528279febe74a5e995589d9c5eeb6c533cc2fe7c (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/generator.cpp')
-rw-r--r--src/tools/qdoc/generator.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 55050806ec..2ff4df9bd7 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -1250,6 +1250,23 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker)
}
/*!
+ Generates a bold line that says:
+ "The signal is private, not emitted by the user.
+ The function is public so the user can pass it to connect()."
+ */
+void Generator::generatePrivateSignalNote(const Node* node, CodeMarker* marker)
+{
+ Text text;
+ text << Atom::ParaLeft
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
+ << "Note: "
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
+ << "This is a private signal. It can be used in signal connections but cannot be emitted by the user."
+ << Atom::ParaRight;
+ generateText(text, node, marker);
+}
+
+/*!
Generate the documentation for \a relative. i.e. \a relative
is the node that reporesentas the entity where a qdoc comment
was found, and \a text represents the qdoc comment.