emit QNetWorkAccessManager::finished on QNetworkReply::abort()
If we can not get online when the request is made then we are in the WaitingForSession state. This will happen for example if the device is in flight mode. This fix follows the same logic as in _q_networkSessionFailed, but we should look into why we have the WaitingForSession check in finished(). Task-number: QT-4747 Reviewed-by: Markus Goetz (cherry picked from commit 0c9cb9a34d6b472cb53bf1af4616af55b593b616)
This commit is contained in:
parent
01cbab598a
commit
483807d4f2
@ -859,6 +859,8 @@ void QNetworkReplyImpl::abort()
|
||||
if (d->state != QNetworkReplyImplPrivate::Finished) {
|
||||
// call finished which will emit signals
|
||||
d->error(OperationCanceledError, tr("Operation canceled"));
|
||||
if (d->state == QNetworkReplyImplPrivate::WaitingForSession)
|
||||
d->state = QNetworkReplyImplPrivate::Working;
|
||||
d->finished();
|
||||
}
|
||||
d->state = QNetworkReplyImplPrivate::Aborted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user