Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
I've seen several crashes related to this in user code, e.g.:
- Code deleted a QLocalSocket in a slot connected to the QLocalSocket's readChannelFinished().
- Similar situations often arise with QNetworkReply and its finished() signal.
Maybe we can have some code that is only enabled in debug mode that warns the user and suggests deleteLater(), e.g.:
Q_WARN_IF_DELETED_IN_SIGNAL_EMISSION(QNetworkReply, SIGNAL(finished())
Attachments
Issue Links
- replaces
-
QTCREATORBUG-2712 Warn when an object gets deleted inside a slot where the signal is that object
-
- Closed
-