I read the document of signal finished() , it does not say the finished() is always emitted. And I read the error() signal:
void QNetworkReply::error(QNetworkReply::NetworkError code) This signal is emitted when the reply detects an error in processing. The finished() signal will probably follow, indicating that the connection is over.
The code parameter contains the code of the error that was detected. Call errorString() to obtain a textual representation of the error condition.
Note: Do not delete the object in the slot connected to this signal. Use deleteLater().
See also error() and errorString().
Does the line The finished() signal will probably follow
mean that, under some conditions, the QNetworkReply does not emit finished() ?