summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-18 21:28:57 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-18 21:28:57 (GMT)
commit8acac3aba4a04f1f8f502190a445093af15cd563 (patch)
tree616fa249ab7abdac83e6b5543040b8cf08c77807
parentbe589f500689395f8579100a121bfdef7c3ed169 (diff)
downloadQt-8acac3aba4a04f1f8f502190a445093af15cd563.zip
Qt-8acac3aba4a04f1f8f502190a445093af15cd563.tar.gz
Qt-8acac3aba4a04f1f8f502190a445093af15cd563.tar.bz2
This changes will make firts FTP UI to be visible
and then, if needed activate IAP dialog.
-rw-r--r--examples/network/ftp/ftpwindow.cpp14
-rw-r--r--examples/network/ftp/ftpwindow.h4
-rw-r--r--examples/network/ftp/main.cpp2
3 files changed, 18 insertions, 2 deletions
diff --git a/examples/network/ftp/ftpwindow.cpp b/examples/network/ftp/ftpwindow.cpp
index abfb6cc..a48252a 100644
--- a/examples/network/ftp/ftpwindow.cpp
+++ b/examples/network/ftp/ftpwindow.cpp
@@ -44,6 +44,10 @@
#include "ftpwindow.h"
+#ifdef Q_OS_SYMBIAN
+#include "sym_iap_util.h"
+#endif
+
FtpWindow::FtpWindow(QWidget *parent)
: QDialog(parent), ftp(0)
{
@@ -115,6 +119,10 @@ FtpWindow::FtpWindow(QWidget *parent)
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
+#ifdef Q_OS_SYMBIAN
+ bDefaultIapSet = false;
+#endif
+
setWindowTitle(tr("FTP"));
}
@@ -126,6 +134,12 @@ QSize FtpWindow::sizeHint() const
//![0]
void FtpWindow::connectOrDisconnect()
{
+#ifdef Q_OS_SYMBIAN
+ if(!bDefaultIapSet) {
+ qt_SetDefaultIap();
+ bDefaultIapSet = true;
+ }
+#endif
if (ftp) {
ftp->abort();
ftp->deleteLater();
diff --git a/examples/network/ftp/ftpwindow.h b/examples/network/ftp/ftpwindow.h
index a3045fa..70c1210 100644
--- a/examples/network/ftp/ftpwindow.h
+++ b/examples/network/ftp/ftpwindow.h
@@ -98,6 +98,10 @@ private:
QString currentPath;
QFtp *ftp;
QFile *file;
+
+#ifdef Q_OS_SYMBIAN
+ bool bDefaultIapSet;
+#endif
//![1]
};
diff --git a/examples/network/ftp/main.cpp b/examples/network/ftp/main.cpp
index ecabb31..5c24788 100644
--- a/examples/network/ftp/main.cpp
+++ b/examples/network/ftp/main.cpp
@@ -45,14 +45,12 @@
#ifdef Q_OS_SYMBIAN
#include <QDir>
#include <QDesktopWidget>
-#include "sym_iap_util.h"
#endif
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(ftp);
#ifdef Q_OS_SYMBIAN
- qt_SetDefaultIap();
// Change current directory from default private to c:\data
// in order that user can access the downloaded content
QDir::setCurrent( "c:\\data" );