summaryrefslogtreecommitdiffstats
path: root/examples/network/qftp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-28 17:39:11 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-04-28 17:39:11 (GMT)
commit3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch)
tree58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/network/qftp
parentddb22795641253a026b72f752ebc769745dd41be (diff)
downloadQt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip
Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz
Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/network/qftp')
-rw-r--r--examples/network/qftp/ftpwindow.cpp8
-rw-r--r--examples/network/qftp/qftp.desktop11
-rw-r--r--examples/network/qftp/qftp.pro4
3 files changed, 22 insertions, 1 deletions
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index c3e629f..c0a2b73 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]
diff --git a/examples/network/qftp/qftp.desktop b/examples/network/qftp/qftp.desktop
new file mode 100644
index 0000000..6149fe9
--- /dev/null
+++ b/examples/network/qftp/qftp.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=FTP
+Exec=/opt/usr/bin/qftp
+Icon=qftp
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/qftp/qftp.pro b/examples/network/qftp/qftp.pro
index 232e8eb..3968365 100644
--- a/examples/network/qftp/qftp.pro
+++ b/examples/network/qftp/qftp.pro
@@ -16,3 +16,7 @@ symbian {
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
TARGET.CAPABILITY="NetworkServices ReadUserData WriteUserData"
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)