Remove unneeded check in QNetworkReplyImpl::abort.
QNetworkReplyImpl::abort immediately returns at the beginning of the function when the state is already finished, and the state does not get changed by the code in between - so this condition will always be true. Change-Id: Ia98df7cbecf471c7236b5e17caddd1301b647d2b Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>bb10
parent
983bdc0713
commit
c4c895d2dd
|
|
@ -923,13 +923,11 @@ void QNetworkReplyImpl::abort()
|
|||
|
||||
QNetworkReply::close();
|
||||
|
||||
if (d->state != QNetworkReplyPrivate::Finished) {
|
||||
// call finished which will emit signals
|
||||
d->error(OperationCanceledError, tr("Operation canceled"));
|
||||
if (d->state == QNetworkReplyPrivate::WaitingForSession)
|
||||
d->state = QNetworkReplyPrivate::Working;
|
||||
d->finished();
|
||||
}
|
||||
// call finished which will emit signals
|
||||
d->error(OperationCanceledError, tr("Operation canceled"));
|
||||
if (d->state == QNetworkReplyPrivate::WaitingForSession)
|
||||
d->state = QNetworkReplyPrivate::Working;
|
||||
d->finished();
|
||||
d->state = QNetworkReplyPrivate::Aborted;
|
||||
|
||||
// finished may access the backend
|
||||
|
|
|
|||
Loading…
Reference in New Issue