void QgsWFSData::handleProgressEvent( qint64 progress, qint64 totalSteps ) { emit dataReadProgress( progress ); if ( totalSteps < 0 ) { totalSteps = 0; } emit totalStepsUpdate( totalSteps ); emit dataProgressAndSteps( progress, totalSteps ); }
bool QHttp::qt_emit( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: stateChanged((int)static_QUType_int.get(_o+1)); break; case 1: responseHeaderReceived((const QHttpResponseHeader&)*((const QHttpResponseHeader*)static_QUType_ptr.get(_o+1))); break; case 2: readyRead((const QHttpResponseHeader&)*((const QHttpResponseHeader*)static_QUType_ptr.get(_o+1))); break; case 3: dataSendProgress((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break; case 4: dataReadProgress((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break; case 5: requestStarted((int)static_QUType_int.get(_o+1)); break; case 6: requestFinished((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break; case 7: done((bool)static_QUType_bool.get(_o+1)); break; default: return QNetworkProtocol::qt_emit(_id,_o); } return TRUE; }
void InstallDialog::init() { //TRACE_OBJ m_ui.statusLabel->setText(tr("Downloading documentation info...")); m_ui.progressBar->show(); QUrl url(QLatin1String("http://qt.nokia.com/doc/assistantdocs/docs.txt")); if (m_port > -1) m_networkAccessManager->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, m_host, m_port)); if (debug) qDebug() << "Sending " << url.toString(); m_networkReply = m_networkAccessManager->get(QNetworkRequest(url)); m_networkReply->setProperty(targetFileProperty, QVariant(QLatin1String(docInfoTargetFileId))); connect(m_networkReply, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(dataReadProgress(qint64,qint64))); m_ui.cancelButton->setEnabled(true); m_ui.closeButton->setEnabled(false); }
connect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)), this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*))); #ifndef QT_NO_NETWORKPROXY connect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*))); #endif // Don't care about ignored SSL errors for now in the synchronous HTTP case. } else if (!synchronous) { connect(httpReply,SIGNAL(headerChanged()), this, SLOT(headerChangedSlot())); connect(httpReply,SIGNAL(finished()), this, SLOT(finishedSlot())); connect(httpReply,SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)), this, SLOT(finishedWithErrorSlot(QNetworkReply::NetworkError,QString))); // some signals are only interesting when normal asynchronous style is used connect(httpReply,SIGNAL(readyRead()), this, SLOT(readyReadSlot())); connect(httpReply,SIGNAL(dataReadProgress(qint64,qint64)), this, SLOT(dataReadProgressSlot(qint64,qint64))); #ifndef QT_NO_SSL connect(httpReply,SIGNAL(encrypted()), this, SLOT(encryptedSlot())); connect(httpReply,SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrorsSlot(QList<QSslError>))); connect(httpReply,SIGNAL(preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)), this, SLOT(preSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator*))); #endif // In the asynchronous HTTP case we can just forward those signals // Connect the reply signals that we can directly forward connect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)), this, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*))); #ifndef QT_NO_NETWORKPROXY connect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); #endif