QNetworkReply: Fix finish signal is not emitted
When a QNetworkReply is in WaitingForSession state and is aborted the finished signal was not emitted. Task-number: QTBUG-37473 Change-Id: Iccc4dfd8e8e65e9e42625a908432ce9083caa231 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This commit is contained in:
parent
7a848d5f13
commit
febded2353
@ -277,6 +277,10 @@ void QNetworkReplyHttpImpl::abort()
|
|||||||
// call finished which will emit signals
|
// call finished which will emit signals
|
||||||
// FIXME shouldn't this be emitted Queued?
|
// FIXME shouldn't this be emitted Queued?
|
||||||
d->error(OperationCanceledError, tr("Operation canceled"));
|
d->error(OperationCanceledError, tr("Operation canceled"));
|
||||||
|
|
||||||
|
// If state is WaitingForSession, calling finished has no effect
|
||||||
|
if (d->state == QNetworkReplyHttpImplPrivate::WaitingForSession)
|
||||||
|
d->state = QNetworkReplyHttpImplPrivate::Working;
|
||||||
d->finished();
|
d->finished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user