summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-07-12 17:44:49 +0200
committerThiago Macieira <thiago.macieira@intel.com>2017-03-17 05:40:32 +0000
commit1cf75af3f2f3430bab11f9ef1eea5deb4c59aa2e (patch)
treec02eff8c864f6cb48fcd73985f8323bb57ebf069 /src
parentcd9b79e0e4b8d36ee7287c787cb57a6f0e1b5672 (diff)
Call disconnectNotify() when disconnecting a QMetaObject::Connection
In all other forms of disconnecting this is done. We also know the signal index, so there is no reason not to do this. Change-Id: Ic8b042cd8f45dbff74b42ee30c384a84bef78b20 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 972580accdd0732b33947e8b1ca0ba8943041bdc) Task-number: QTBUG-59500 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 467b4c6780..6fd7d0202f 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4760,11 +4760,12 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
c->isSlotObject = false;
}
+ c->sender->disconnectNotify(QMetaObjectPrivate::signal(c->sender->metaObject(),
+ c->signal_index));
+
const_cast<QMetaObject::Connection &>(connection).d_ptr = 0;
c->deref(); // has been removed from the QMetaObject::Connection object
- // disconnectNotify() not called (the signal index is unknown).
-
return true;
}