diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-28 13:06:08 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-29 22:43:00 +0200 |
commit | 86fa23b5e35041189d8598945a642904b18dbedb (patch) | |
tree | 5ccb81a6e6865148ef78bd286651a6a4eb835317 | |
parent | 5d6b763ee521b830c2b19949016f9436627496d6 (diff) |
Don't compare the target methods for SlotObject connections
When a new-style connection is created (a SlotObject), we don't store
the method offset since there isn't one. So don't try to read it.
Qt::UniqueConnection only applies to old-style connections, since we
can't compare the slot objects for equality. In any case, an old-style
connection and a new style will never be considered equal.
Task-number: QTBUG-39927
Change-Id: I10a39a7bc97a2ec9509a0708038cc491bcc67329
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Elias Probst <mail@eliasprobst.eu>
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 38e55b7aa9..5e8a97cdc0 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3230,7 +3230,7 @@ QObjectPrivate::Connection *QMetaObjectPrivate::connect(const QObject *sender, int method_index_absolute = method_index + method_offset; while (c2) { - if (c2->receiver == receiver && c2->method() == method_index_absolute) + if (!c2->isSlotObject && c2->receiver == receiver && c2->method() == method_index_absolute) return 0; c2 = c2->nextConnectionList; } |