fix: waitforfinished

This commit is contained in:
lizhiyuan 2022-07-08 17:19:13 +08:00
parent 198384c552
commit cdb4fc05a1

View File

@ -176,11 +176,9 @@ void DownloadController::startDownload(const QString &url)
auto pidNumber = cmd->processId(); auto pidNumber = cmd->processId();
this->pidNumber = pidNumber; this->pidNumber = pidNumber;
int statusSum = 0; while (cmd->waitForFinished(-1))
while (statusSum > -20)
{ {
auto status = cmd->waitForFinished() - 1; continue;
statusSum += status;
} }
emit downloadFinished(); emit downloadFinished();
}); });