Exemplo n.º 1
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();
}
Exemplo n.º 2
0
/* Starting routine: */
void UIDownloader::start()
{
    startDelayedAcknowledging();
}