Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.5, 6.x
-
None
-
-
68f641095c (qt/qtbase/dev) 68f641095c (qt/tqtc-qtbase/dev) 678928f4af (qt/tqtc-qtbase/5.15) f2c00dd038 (qt/qtbase/6.4) f2c00dd038 (qt/tqtc-qtbase/6.4) 4a3a7ae6b8 (qt/tqtc-qtbase/6.2) 678928f4af (qt/tqtc-qtbase/5.15-vxworks)
Description
QNetworkReplyFileImpl::QNetworkReplyFileImpl() calls fileOpenFinished(false) #if !defined(Q_OS_WIN) and if (!url.host().isEmpty()).
QNetworkReplyFileImpl::fileOpenFinished() unconditionally emits finished().
Other classes derived from QNetworkReply take care to not emit this signal directly from constructor, because the users cannot connect to a signal before the reply object is constructed. Is this a bug or is every QNetworkReply user supposed to check isFinished() after a network reply construction and not rely on finished() being emitted if it returns true? Also if the user code needs to destroy a network reply when finished, is calling deleteLater() on it safe as soon as isFinished() returns true, without waiting for the finished() signal?
QNetworkReply's documentation could be improved to clarify these usage questions.