Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.0.0, 5.7.0 RC
-
None
Description
Take the following excerpt:
QVERIFY(QObject::connect(&sender, &SenderObject::signal1, &o, public_slot));
// disconnect the *private* virtual
QVERIFY(!QObjectPrivate::disconnect(&sender, &SenderObject::signal1, o.d_func(), private_slot));
It's possible that the disconnect of the private will disconnect the public because public_slot and private_slot may have the same representation if they're both pointers to virtual member functions.
Testcase patch attached, currently produces:
FAIL! : tst_QObject::disconnectPrivateVirtualSlots() '!QObjectPrivate::disconnect(&sender, &SenderObject::signal1, o.d_func(), private_slot)' returned FALSE. ()
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-53684 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
160879,2 | Fix comparison of PMFs in QObjectPrivate::connect() and disconnect() | 5.8 | qt/qtbase | Status: ABANDONED | -1 | 0 |