mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-23 11:32:21 +08:00
fix:安装结束后仍显示Installing
This commit is contained in:
parent
795c3308d3
commit
e17c50d396
@ -309,6 +309,10 @@ void AppIntoPage::on_downloadButton_clicked()
|
|||||||
{
|
{
|
||||||
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())]->install(0);
|
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())]->install(0);
|
||||||
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
|
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;
|
return;
|
||||||
}
|
}
|
||||||
emit clickedDownloadBtn();
|
emit clickedDownloadBtn();
|
||||||
@ -318,6 +322,10 @@ void AppIntoPage::on_downloadButton_clicked()
|
|||||||
dw->getDIList()[dw->allDownload - 1]->reinstall = true;
|
dw->getDIList()[dw->allDownload - 1]->reinstall = true;
|
||||||
}
|
}
|
||||||
ui->downloadButton->setEnabled(false);
|
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());
|
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ void DownloadItem::install(int t)
|
|||||||
ui->widget_spinner->hide();
|
ui->widget_spinner->hide();
|
||||||
DownloadItem::isInstall = false;
|
DownloadItem::isInstall = false;
|
||||||
});
|
});
|
||||||
|
emit finished();
|
||||||
qDebug()<<ui->label_filename->text().toUtf8();
|
qDebug()<<ui->label_filename->text().toUtf8();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user