path: root/src/corelib/kernel/qmetaobject_p.h
diff options
authorOlivier Goffart <>2011-11-18 10:57:04 +0100
committerQt by Nokia <>2011-11-29 17:08:39 +0100
commited0b262de97dd92c831127909ea4c059962b86ce (patch)
treeb5ab25866220b0d0a136bd5b77dd227d55fcb0f8 /src/corelib/kernel/qmetaobject_p.h
parenta482487b9ff0cf0c47f9c0927c44019d52e2fdf8 (diff)
QObject::disconnect with new syntax
This add an overload to disconnect which is symetrical to the new syntax of connect. It is possible to diconnect connection like this: QObject::connect( sender, &Sender::valueChanged, receiver, &Receiver::updateValue ); QObject::disconnect( sender, &Sender::valueChanged, receiver, &Receiver::updateValue ); This overload only work with pointer to member function, and not static functions or functors. The test is copied from tst_QObject::disconnect(), just changed the syntax of the connection and disconnection Change-Id: Ia8f819100cb12098e32877522b97b732b1e676a8 Reviewed-by: Bradley T. Hughes <>
Diffstat (limited to 'src/corelib/kernel/qmetaobject_p.h')
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index 0476558a92..b99907e822 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -142,11 +142,11 @@ struct QMetaObjectPrivate
const QMetaObject *rmeta = 0,
int type = 0, int *types = 0);
static bool disconnect(const QObject *sender, int signal_index,
- const QObject *receiver, int method_index,
+ const QObject *receiver, int method_index, void **slot,
DisconnectType = DisconnectAll);
static inline bool disconnectHelper(QObjectPrivate::Connection *c,
- const QObject *receiver, int method_index,
- QMutex *senderMutex, DisconnectType);
+ const QObject *receiver, int method_index, void **slot,
+ QMutex *senderMutex, DisconnectType = DisconnectAll);