summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-07 17:25:06 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-04-07 17:25:06 (GMT)
commit384679ff46d2f970de3010fd6aac8a697dbfb907 (patch)
treefd290567c21b3ccc3a319db2fc8d176b27f9bfd0 /examples
parent214751c5e7d7af6770cbd36a431d8f718c3041e1 (diff)
downloadQt-384679ff46d2f970de3010fd6aac8a697dbfb907.zip
Qt-384679ff46d2f970de3010fd6aac8a697dbfb907.tar.gz
Qt-384679ff46d2f970de3010fd6aac8a697dbfb907.tar.bz2
Ensured that incomplete downloads are removed.
Task-number: QTBUG-18509
Diffstat (limited to 'examples')
-rw-r--r--examples/network/qftp/ftpwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index c3e629f..159cad6 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -243,6 +243,12 @@ void FtpWindow::downloadFile()
void FtpWindow::cancelDownload()
{
ftp->abort();
+
+ if (file->exists()) {
+ file->close();
+ file->remove();
+ }
+ delete file;
}
//![5]