summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-12-19 11:28:40 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-01-26 07:45:11 +0000
commitdfd7a0e41153315625883619a4abe84db1d29769 (patch)
treea16e93af1807155e8ece266e7224b5d476bbdb31 /src
parentdcfeeef91ef17f15adb3f961f1abce3ef169b263 (diff)
Doc: add a note that UniqueConnection does not work for lambdas
Task-number: QTBUG-52438 Change-Id: I3e4e5051937c40319d6efffd1491bef6feb6776e Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 63b02d2c0c..c44e4b16b1 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2614,6 +2614,9 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM
(exact same signal to the exact same slot on the same objects),
the connection will fail and connect will return an invalid QMetaObject::Connection.
+ \note Qt::UniqueConnections do not work for lambdas, non-member functions
+ and functors; they only apply to connecting to member functions.
+
The optional \a type parameter describes the type of connection
to establish. In particular, it determines whether a particular
signal is delivered to a slot immediately or queued for delivery
@@ -4665,7 +4668,10 @@ void qDeleteInEventHandler(QObject *o)
Creates a connection of a given \a type from \a signal in
\a sender object to \a functor to be placed in a specific event
- loop of \a context, and returns a handle to the connection
+ loop of \a context, and returns a handle to the connection.
+
+ \note Qt::UniqueConnections do not work for lambdas, non-member functions
+ and functors; they only apply to connecting to member functions.
The signal must be a function declared as a signal in the header.
The slot function can be any function or functor that can be connected