/* Handle acknowledging result: */
void UIDownloader::handleAcknowledgingResult(UINetworkReply *pNetworkReply)
{
    /* Get the final source: */
    m_source = pNetworkReply->url();

    /* Ask for downloading: */
    if (askForDownloadingConfirmation(pNetworkReply))
    {
        /* Start downloading: */
        startDelayedDownloading();
    }
    else
    {
        /* Delete downloader: */
        deleteLater();
    }
}
示例#2
0
/* Handle acknowledging result: */
void UIDownloader::handleAcknowledgingResult(QNetworkReply *pReply)
{
    /* Check if redirection required: */
    QUrl redirect = pReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
    if (redirect.isValid())
    {
        /* Set new source: */
        UIDownloader::setSource(redirect.toString());
        /* Start redirecting: */
        startDelayedAcknowledging();
        return;
    }

    /* Ask for downloading confirmation: */
    if (askForDownloadingConfirmation(pReply))
    {
        /* Start downloading: */
        startDelayedDownloading();
        return;
    }

    /* Delete downloader: */
    deleteLater();
}