fix:安装结束后仍显示Installing

This commit is contained in:
柚子 2022-12-15 14:55:46 +08:00
parent 795c3308d3
commit e17c50d396
2 changed files with 9 additions and 1 deletions
src

@ -309,6 +309,10 @@ void AppIntoPage::on_downloadButton_clicked()
{
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())]->install(0);
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,[=](){
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr);
});
return;
}
emit clickedDownloadBtn();
@ -318,6 +322,10 @@ void AppIntoPage::on_downloadButton_clicked()
dw->getDIList()[dw->allDownload - 1]->reinstall = true;
}
ui->downloadButton->setEnabled(false);
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,[=](){
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr);
});
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
}

@ -165,7 +165,7 @@ void DownloadItem::install(int t)
ui->widget_spinner->hide();
DownloadItem::isInstall = false;
});
emit finished();
qDebug()<<ui->label_filename->text().toUtf8();
}