Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.1
-
None
-
d359b0af2b93aeb9c22714be1cec881417650ed8
Description
Platform : Windows XP
Platform details: Service Pack 2
Compilers : MSVC
Compiler details : Microsoft Visual Studio 2008 Service Pack 1
Steps to reproduce / test case
main.cpp
#include <QObject> class DisconnectTest: public QObject { Q_OBJECT signals: void testSignal(); protected: void connectNotify(char const * signal) { std::cout << "signal \"" << signal << "\" connected" << std::endl; } void disconnectNotify(char const * signal) { std::cout << "signal \"" << signal << "\" disconnected" << std::endl; } }; int main() { QObject * dummy = new QObject; DisconnectTest * test = new DisconnectTest; // the slot does not matter here, we never emit the signal anyway QObject::connect(test, SIGNAL(testSignal()), dummy, SLOT(deleteLater())); // here the disconnectNotify() should be called (the receiver is destroyed and the slot is disconnected), but it does not delete dummy; // cleanup delete test; return 0; }
Attachments
For Gerrit Dashboard: QTBUG-4844 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
11261,1 | Deprecate QObject::disconnectNotify | master | qt/qtbase | Status: ABANDONED | -2 | 0 |