summaryrefslogtreecommitdiffstats
path: root/src/testlib/qsignalspy.qdoc
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-24 01:00:14 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-10-24 10:23:44 +0200
commitb327807c5ed6f151bfb22c2fe204ed289a3b6254 (patch)
tree880a0e7664e1270f4f51ccf79a3cf2ddbcd7d810 /src/testlib/qsignalspy.qdoc
parentaa4b0f5cb7e84046530fbc26581f777506fea658 (diff)
parentb61c6164c100defc519b178d73858df59cffc48d (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
Diffstat (limited to 'src/testlib/qsignalspy.qdoc')
-rw-r--r--src/testlib/qsignalspy.qdoc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 5ea6bc5dc7..d532ad478d 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -48,7 +48,7 @@
\snippet code/doc_src_qsignalspy.cpp 1
- \b {Note:} Non-standard data types need to be registered, using
+ \note Non-standard data types need to be registered, using
the qRegisterMetaType() function, before you can create a
QSignalSpy. For example:
@@ -57,6 +57,18 @@
To retrieve the instance, you can use qvariant_cast:
\snippet code/doc_src_qsignalspy.cpp 3
+
+ \section1 Verifying Signal Emissions
+
+ The QSignalSpy class provides an elegant mechanism for capturing the list
+ of signals emitted by an object. However, you should verify its validity
+ after construction. The constructor does a number of sanity checks, such as
+ verifying that the signal to be spied upon actually exists. To make the
+ diagnosis of test failures easier, the results of these checks should be
+ checked by calling \c QVERIFY(spy.isValid()) before proceeding further with
+ a test.
+
+ \sa QVERIFY()
*/
/*! \fn QSignalSpy::QSignalSpy(const QObject *object, const char *signal)