mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-20 12:32:21 +08:00
修复取消下载导致闪退
This commit is contained in:
parent
83ee212484
commit
fca2086d9f
@ -72,11 +72,11 @@ void DownloadListWidget::clearItem()
|
||||
}
|
||||
void DownloadListWidget::addItem(QString name,QString fileName,QString pkgName,const QPixmap icon,QString downloadurl)
|
||||
{
|
||||
urList.append(downloadurl);
|
||||
if(fileName.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
urList.append(downloadurl);
|
||||
allDownload += 1;
|
||||
DownloadItem *di=new DownloadItem(this);
|
||||
dlist<<downloadurl;
|
||||
@ -137,6 +137,11 @@ void DownloadListWidget::httpFinished() // 完成下载
|
||||
while(downloaditemlist[nowDownload - 1]->close)
|
||||
{
|
||||
nowDownload += 1;
|
||||
if(nowDownload >= allDownload)
|
||||
{
|
||||
nowDownload = allDownload;
|
||||
return;
|
||||
}
|
||||
}
|
||||
QString fileName = downloaditemlist[nowDownload - 1]->getName();
|
||||
startRequest(urList.at(nowDownload-1), fileName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user