Comment 1 for bug 1229463

Revision history for this message
Manuel de la Peña (mandel) wrote :

Looking at the cancelation code of the singled download object (since a group download is a simple collection of those) we have the following:

        Q_Q(SingleDownload);
        qDebug() << __PRETTY_FUNCTION__ << _url;

        if (_reply != NULL) {
            // disconnect so that we do not get useless signals
            // and remove the reply
            disconnectFromReplySignals();
            _reply->abort();
            _reply->deleteLater();
            _reply = NULL;
        }

        // remove current data and metadata
        cleanUpCurrentData();
        emit q->canceled(true);

As soon as the cancel is called if the reply is not null we will call deleteLater, the only diff between a delete and a deleteLater is that deleteLater will delete the object once all the signals of the reply object have been processed.. I could try and use a delete and ignore those signals since we have aborted the request to see if that speeds up the process.