diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2014-04-21 18:58:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-25 10:55:31 +0200 |
commit | c1d41b42a18fc1566b2d5cfdae2a743f3e0fb8d9 (patch) | |
tree | 39a2e4c55ccfed5aebc643d37e449808b49861af /src | |
parent | 3f4c8293f250f5a94d44a7dac4f7d8e721598922 (diff) |
Document that the connection stay active when objects used in a lambda are destroyed
Task-number: QTBUG-37472
Change-Id: I44a6d7f8bf6928cd99a05d1b00fe36313cb18ffa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 01bedb4a3a..ea02352d56 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4433,6 +4433,8 @@ void qDeleteInEventHandler(QObject *o) \snippet code/src_corelib_kernel_qobject.cpp 46 The connection will automatically disconnect if the sender is destroyed. + However, you should take care that any objects used within the functor + are still alive when the signal is emitted. \note If the compiler does not support C++11 variadic templates, the number of arguments in the signal or slot are limited to 6, and the functor object @@ -4470,6 +4472,8 @@ void qDeleteInEventHandler(QObject *o) The connection will automatically disconnect if the sender or the context is destroyed. + However, you should take care that any objects used within the functor + are still alive when the signal is emitted. \note If the compiler does not support C++11 variadic templates, the number of arguments in the signal or slot are limited to 6, and the functor object |