From febded23536e1e3f4c572ee54ef618aad4164c43 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Sun, 29 Jun 2014 21:00:17 +0200 Subject: [PATCH] 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 --- src/network/access/qnetworkreplyhttpimpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index f56c77505a..3f546cf581 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -277,6 +277,10 @@ void QNetworkReplyHttpImpl::abort() // call finished which will emit signals // FIXME shouldn't this be emitted Queued? 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(); }