Exemplo n.º 1
0
/* Finish downloading: */
void UIDownloader::sltFinishDownloading()
{
    /* Get corresponding network reply object: */
    QNetworkReply *pReply = qobject_cast<QNetworkReply*>(sender());
    /* And ask it for suicide: */
    pReply->deleteLater();

    /* Handle normal reply: */
    if (pReply->error() == QNetworkReply::NoError)
        handleDownloadingResult(pReply);
    /* Handle errors: */
    else
        handleError(pReply);
}
Exemplo n.º 2
0
/* Network-reply finished handler: */
void UIDownloader::processNetworkReplyFinished(UINetworkReply *pNetworkReply)
{
    /* Process reply: */
    switch (m_state)
    {
        case UIDownloaderState_Acknowledging:
        {
            handleAcknowledgingResult(pNetworkReply);
            break;
        }
        case UIDownloaderState_Downloading:
        {
            handleDownloadingResult(pNetworkReply);
            break;
        }
        default:
            break;
    }
}