fix(net): fix emit signals in download & upload task
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
@ -117,7 +117,7 @@ void Download::executeTask()
|
||||
switch (m_state) {
|
||||
case State::Succeeded:
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download cache hit " << m_url.toString();
|
||||
emitSucceeded();
|
||||
emit succeeded();
|
||||
return;
|
||||
case State::Running:
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Downloading " << m_url.toString();
|
||||
@ -294,19 +294,19 @@ void Download::downloadFinished()
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download failed but we are allowed to proceed:" << m_url.toString();
|
||||
m_sink->abort();
|
||||
m_reply.reset();
|
||||
emitSucceeded();
|
||||
emit succeeded();
|
||||
return;
|
||||
} else if (m_state == State::Failed) {
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download failed in previous step:" << m_url.toString();
|
||||
m_sink->abort();
|
||||
m_reply.reset();
|
||||
emitFailed("");
|
||||
emit failed("");
|
||||
return;
|
||||
} else if (m_state == State::AbortedByUser) {
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download aborted in previous step:" << m_url.toString();
|
||||
m_sink->abort();
|
||||
m_reply.reset();
|
||||
emitAborted();
|
||||
emit aborted();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -323,13 +323,13 @@ void Download::downloadFinished()
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download failed to finalize:" << m_url.toString();
|
||||
m_sink->abort();
|
||||
m_reply.reset();
|
||||
emitFailed("");
|
||||
emit failed("");
|
||||
return;
|
||||
}
|
||||
|
||||
m_reply.reset();
|
||||
qCDebug(taskDownloadLogC) << getUid().toString() << "Download succeeded:" << m_url.toString();
|
||||
emitSucceeded();
|
||||
emit succeeded();
|
||||
}
|
||||
|
||||
void Download::downloadReadyRead()
|
||||
|
Reference in New Issue
Block a user