From 86fa23b5e35041189d8598945a642904b18dbedb Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 28 Jun 2014 13:06:08 -0700 Subject: 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 Reviewed-by: Elias Probst --- src/corelib/kernel/qobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel') 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; } -- cgit v1.2.3