diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-05-09 11:56:47 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2011-05-09 12:05:52 (GMT) |
commit | 0c9cb9a34d6b472cb53bf1af4616af55b593b616 (patch) | |
tree | 49d4fa975bffbbcfabc2f059d81c2b7bf8a3dcb8 /src | |
parent | f0ae4f8ebdc6b7c50c163cfa29e686f3f87c8ba5 (diff) | |
download | Qt-0c9cb9a34d6b472cb53bf1af4616af55b593b616.zip Qt-0c9cb9a34d6b472cb53bf1af4616af55b593b616.tar.gz Qt-0c9cb9a34d6b472cb53bf1af4616af55b593b616.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 069755f..09fab51 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -775,6 +775,8 @@ void QNetworkReplyImpl::abort() if (d->state != QNetworkReplyImplPrivate::Finished) { // emit signals d->error(OperationCanceledError, tr("Operation canceled")); + if (d->state == QNetworkReplyImplPrivate::WaitingForSession) + d->state = QNetworkReplyImplPrivate::Working; d->finished(); } d->state = QNetworkReplyImplPrivate::Aborted; |