summaryrefslogtreecommitdiffstats
path: root/examples/network/qftp/ftpwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/qftp/ftpwindow.cpp')
-rw-r--r--examples/network/qftp/ftpwindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index 562b9fe4aa..1c0d057c66 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -51,7 +51,7 @@ FtpWindow::FtpWindow(QWidget *parent)
ftpServerLabel->setBuddy(ftpServerLineEdit);
statusLabel = new QLabel(tr("Please enter the name of an FTP server."));
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
// Use word wrapping to fit the text on screen
statusLabel->setWordWrap( true );
#endif
@@ -243,6 +243,12 @@ void FtpWindow::downloadFile()
void FtpWindow::cancelDownload()
{
ftp->abort();
+
+ if (file->exists()) {
+ file->close();
+ file->remove();
+ }
+ delete file;
}
//![5]