summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-04-25 14:31:11 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-05-08 23:14:01 (GMT)
commit85f025245c42864d5a2f67fb72992a166a993829 (patch)
tree53cd25bfcd054f93ad63ebc04b9d7f496a475b1e /src
parent64ba8012c54a49d371cca21d3c296c01cbbb0278 (diff)
downloadQt-85f025245c42864d5a2f67fb72992a166a993829.zip
Qt-85f025245c42864d5a2f67fb72992a166a993829.tar.gz
Qt-85f025245c42864d5a2f67fb72992a166a993829.tar.bz2
QNetworkAccessManager - ensure abort reaches QFtp
Previously, we just disconnected signals from QFtp and allowed it to continue downloading in the background. Task-number: QTBUG-25494 Change-Id: I891c2fff88ef1ee554d1ccf821a3f7998eeb8406 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> (cherry picked from commit c6864e0a580793f29c7d2cf180fc0f2ac2fc2b2c)
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index 6b9ce50..2b97b66 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -107,6 +107,9 @@ QNetworkAccessFtpBackend::QNetworkAccessFtpBackend()
QNetworkAccessFtpBackend::~QNetworkAccessFtpBackend()
{
+ //if backend destroyed while in use, then abort (this is the code path from QNetworkReply::abort)
+ if (ftp && state != Disconnecting)
+ ftp->abort();
disconnectFromFtp();
}