Ejemplo n.º 1
0
void NetworkProgram::makeRequest() {
    QNetworkAccessManager* manager = _cache->getNetworkAccessManager();
    if (manager == NULL) {
        return;
    }
    _reply = manager->get(_request);
    
    connect(_reply, SIGNAL(downloadProgress(qint64,qint64)), SLOT(handleDownloadProgress(qint64,qint64)));
    connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(handleReplyError()));
}
Ejemplo n.º 2
0
void FileTransfersPage::setDownloadNetworkReply(QNetworkReply *networkReply)
{
    downloadNetworkReply = networkReply;

    connect(
        downloadNetworkReply,
        SIGNAL(readyRead()),
        SLOT(handleDownloadReadyRead())
        );
    connect(
        downloadNetworkReply,
        SIGNAL(downloadProgress(qint64, qint64)),
        SLOT(handleDownloadProgress(qint64, qint64))
        );
}