summaryrefslogtreecommitdiffstats
path: root/src/testlib/qsignalspy.qdoc
diff options
context:
space:
mode:
authorKeith Gardner <kreios4004@gmail.com>2014-04-16 20:43:56 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-23 22:26:00 +0200
commit6fc7d76e7309c01a364b0f72d253735366674f29 (patch)
treedfae10def866703eff8a53b5101162a1a0f5f0d6 /src/testlib/qsignalspy.qdoc
parenteb88aaa3a2aed3235cf837e858f530f6a521349f (diff)
QSignalSpy: Added template function pointer constructor
Added the function pointer constructor to QSignalSpy to take advantage of the new connect syntax. Change-Id: I94218a096c677cdba73e1b2cfa8b9c09bc28145f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'src/testlib/qsignalspy.qdoc')
-rw-r--r--src/testlib/qsignalspy.qdoc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 9559090e8f..31cdeaba6a 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -72,6 +72,20 @@
\snippet code/doc_src_qsignalspy.cpp 4
*/
+/*! \fn QSignalSpy::QSignalSpy(const QObject *object, PointerToMemberFunction signal)
+ \since 5.4
+
+ Constructs a new QSignalSpy that listens for emissions of the \a signal
+ from the QObject \a object. If QSignalSpy is not able to listen for a
+ valid signal (for example, because \a object is null or \a signal does
+ not denote a valid signal of \a object), an explanatory warning message
+ will be output using qWarning() and subsequent calls to \c isValid() will
+ return false.
+
+ Example:
+ \snippet code/doc_src_qsignalspy.cpp 6
+*/
+
/*! \fn QSignalSpy::isValid() const
Returns \c true if the signal spy listens to a valid signal, otherwise false.