summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-07 19:25:06 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-04-07 19:25:06 +0200
commit384679ff46d2f970de3010fd6aac8a697dbfb907 (patch)
treefd290567c21b3ccc3a319db2fc8d176b27f9bfd0 /examples
parent214751c5e7d7af6770cbd36a431d8f718c3041e1 (diff)
downloadqt4-tools-384679ff46d2f970de3010fd6aac8a697dbfb907.tar.gz
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 c3e629f4f2..159cad621b 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]