From 603414525dff5cefa0798de1087f1ea1ff92910b Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 19 Nov 2012 09:58:24 +0100 Subject: Revise QObject::connect documentation. Change-Id: I07d593b6b2c3d5c8843212d5a888525ac29ca1b0 Reviewed-by: Paul Olav Tvete Reviewed-by: Olivier Goffart --- src/corelib/kernel/qobject.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 268677ee1b..0d97266f4f 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2381,15 +2381,16 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM can be connected to one slot. If a signal is connected to several slots, the slots are activated - in the same order as the order the connection was made, when the + in the same order in which the connections were made, when the signal is emitted. - The function returns a handle to a connection if it successfully - connects the signal to the slot. The Connection handle will be invalid + The function returns a QMetaObject::Connection that represents + a handle to a connection if it successfully + connects the signal to the slot. The connection handle will be invalid if it cannot create the connection, for example, if QObject is unable to verify the existence of either \a signal or \a method, or if their signatures aren't compatible. - You can check if the QMetaObject::Connection is valid by casting it to a bool. + You can check if the handle is valid by casting it to a bool. By default, a signal is emitted for every connection you make; two signals are emitted for duplicate connections. You can break -- cgit v1.2.3