diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-03-01 11:24:27 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-03-01 11:24:27 (GMT) |
commit | 4cc9d165663728cb08b3269ea88a584410b79b70 (patch) | |
tree | d1e1993be1d929a00478be0629d9fec910dd86ca /examples/network/http/httpwindow.h | |
parent | 3a4dc08d08ce0388dd183a24923871e3e03ba531 (diff) | |
parent | 049330b4a54836f227a0e179082527a5272e868d (diff) | |
download | Qt-4cc9d165663728cb08b3269ea88a584410b79b70.zip Qt-4cc9d165663728cb08b3269ea88a584410b79b70.tar.gz Qt-4cc9d165663728cb08b3269ea88a584410b79b70.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'examples/network/http/httpwindow.h')
-rw-r--r-- | examples/network/http/httpwindow.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h index 9dca8a5..83898af 100644 --- a/examples/network/http/httpwindow.h +++ b/examples/network/http/httpwindow.h @@ -43,18 +43,21 @@ #define HTTPWINDOW_H #include <QDialog> +#include <QNetworkAccessManager> +#include <QUrl> QT_BEGIN_NAMESPACE class QDialogButtonBox; class QFile; -class QHttp; -class QHttpResponseHeader; class QLabel; class QLineEdit; class QProgressDialog; class QPushButton; class QSslError; class QAuthenticator; +class QNetworkReply; + + QT_END_NAMESPACE class HttpWindow : public QDialog @@ -64,16 +67,18 @@ class HttpWindow : public QDialog public: HttpWindow(QWidget *parent = 0); + void startRequest(QUrl url); + private slots: void downloadFile(); void cancelDownload(); - void httpRequestFinished(int requestId, bool error); - void readResponseHeader(const QHttpResponseHeader &responseHeader); - void updateDataReadProgress(int bytesRead, int totalBytes); + void httpFinished(); + void httpReadyRead(); + void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes); void enableDownloadButton(); - void slotAuthenticationRequired(const QString &, quint16, QAuthenticator *); + void slotAuthenticationRequired(QNetworkReply*,QAuthenticator *); #ifndef QT_NO_OPENSSL - void sslErrors(const QList<QSslError> &errors); + void sslErrors(QNetworkReply*,const QList<QSslError> &errors); #endif private: @@ -85,7 +90,9 @@ private: QPushButton *quitButton; QDialogButtonBox *buttonBox; - QHttp *http; + QUrl url; + QNetworkAccessManager qnam; + QNetworkReply *reply; QFile *file; int httpGetId; bool httpRequestAborted; |