summaryrefslogtreecommitdiffstats
path: root/examples/network/qftp/ftpwindow.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-10-19 13:00:28 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-10-19 13:12:10 (GMT)
commit104c22a68c422152ff3cf03eb3615e7826fefbd0 (patch)
treef3c4df1a5e500ad73fcc73e5ae6f5d5201dc1c84 /examples/network/qftp/ftpwindow.h
parent29495592d27505feff024d574e1333809794c304 (diff)
downloadQt-104c22a68c422152ff3cf03eb3615e7826fefbd0.zip
Qt-104c22a68c422152ff3cf03eb3615e7826fefbd0.tar.gz
Qt-104c22a68c422152ff3cf03eb3615e7826fefbd0.tar.bz2
Fix FTP example to handle failure to open network session
The example code only dealt with successful opening of the session. If the session open failed, the application is stuck because the connect button is disabled. Moved the session open to be part of connection. Handled session open failure by puttin the UI back in the default state where connection button is enabled. Task-Number: QTBUG-9909 Reviewed-By: Miikka Heikkinen
Diffstat (limited to 'examples/network/qftp/ftpwindow.h')
-rw-r--r--examples/network/qftp/ftpwindow.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/network/qftp/ftpwindow.h b/examples/network/qftp/ftpwindow.h
index a9df99d..f060bfc 100644
--- a/examples/network/qftp/ftpwindow.h
+++ b/examples/network/qftp/ftpwindow.h
@@ -43,6 +43,7 @@
#include <QDialog>
#include <QHash>
+#include <QNetworkConfigurationManager>
QT_BEGIN_NAMESPACE
class QDialogButtonBox;
@@ -71,6 +72,7 @@ private slots:
void connectOrDisconnect();
void downloadFile();
void cancelDownload();
+ void connectToFtp();
void ftpCommandFinished(int commandId, bool error);
void addToList(const QUrlInfo &urlInfo);
@@ -101,6 +103,7 @@ private:
QFile *file;
QNetworkSession *networkSession;
+ QNetworkConfigurationManager manager;
//![1]
};