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>
This commit is contained in:
Shane Kearns 2012-04-25 15:31:11 +01:00 committed by Qt by Nokia
parent fb44114e06
commit c6864e0a58

View File

@ -107,6 +107,9 @@ QNetworkAccessFtpBackend::QNetworkAccessFtpBackend()
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(); disconnectFromFtp();
} }