examples/network/http/httpwindow.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    70 
    70 
    71     progressDialog = new QProgressDialog(this);
    71     progressDialog = new QProgressDialog(this);
    72 
    72 
    73     http = new QHttp(this);
    73     http = new QHttp(this);
    74 
    74 
    75     connect(urlLineEdit, SIGNAL(textChanged(const QString &)),
    75     connect(urlLineEdit, SIGNAL(textChanged(QString)),
    76             this, SLOT(enableDownloadButton()));
    76             this, SLOT(enableDownloadButton()));
    77     connect(http, SIGNAL(requestFinished(int, bool)),
    77     connect(http, SIGNAL(requestFinished(int,bool)),
    78             this, SLOT(httpRequestFinished(int, bool)));
    78             this, SLOT(httpRequestFinished(int,bool)));
    79     connect(http, SIGNAL(dataReadProgress(int, int)),
    79     connect(http, SIGNAL(dataReadProgress(int,int)),
    80             this, SLOT(updateDataReadProgress(int, int)));
    80             this, SLOT(updateDataReadProgress(int,int)));
    81     connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
    81     connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
    82             this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
    82             this, SLOT(readResponseHeader(QHttpResponseHeader)));
    83     connect(http, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)),
    83     connect(http, SIGNAL(authenticationRequired(QString,quint16,QAuthenticator*)),
    84             this, SLOT(slotAuthenticationRequired(const QString &, quint16, QAuthenticator *)));
    84             this, SLOT(slotAuthenticationRequired(QString,quint16,QAuthenticator*)));
    85 #ifndef QT_NO_OPENSSL
    85 #ifndef QT_NO_OPENSSL
    86     connect(http, SIGNAL(sslErrors(const QList<QSslError> &)),
    86     connect(http, SIGNAL(sslErrors(QList<QSslError>)),
    87             this, SLOT(sslErrors(const QList<QSslError> &)));
    87             this, SLOT(sslErrors(QList<QSslError>)));
    88 #endif
    88 #endif
    89     connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
    89     connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
    90     connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
    90     connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
    91     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
    91     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
    92 
    92