mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-08-08 13:42:21 +08:00
fix: ISSUE #I66334 安装结束后仍显示 Installing
DownloadItem::install 中 finished 信号发送时间错误:安装操作被放入 QtConcurrent::run 中异步执行,发送信号在主线程中,安装未结束就发送了信号 Log: 调整信号发送位置至子线程中;AppIntoPage::isDownloading 中,若安装任务正在执行,需要 return,否则会出现安装后卸载再重新安装时,直接显示卸载按钮的问题
This commit is contained in:
parent
ba331cb3fb
commit
65c26f035b
src
@ -196,30 +196,28 @@ void AppIntoPage::openUrl(QUrl url)
|
||||
|
||||
void AppIntoPage::isDownloading(QUrl url)
|
||||
{
|
||||
if(dw->getUrlList().lastIndexOf(url) == -1)
|
||||
{
|
||||
if (dw->getUrlList().lastIndexOf(url) == -1) {
|
||||
ui->downloadButton->setEnabled(true);
|
||||
return;
|
||||
}else{
|
||||
} else {
|
||||
ui->downloadButton->setEnabled(false);
|
||||
}
|
||||
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2)
|
||||
{
|
||||
|
||||
ui->pushButton_3->hide();
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2) {
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Download"));
|
||||
}
|
||||
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1)
|
||||
{
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1) {
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Install"));
|
||||
}
|
||||
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall)
|
||||
{
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall) {
|
||||
ui->downloadButton->setEnabled(false);
|
||||
ui->downloadButton->setText(tr("Installing"));
|
||||
return;
|
||||
}
|
||||
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3)
|
||||
{
|
||||
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3) {
|
||||
ui->downloadButton->setEnabled(true);
|
||||
ui->downloadButton->setText(tr("Reinstall"));
|
||||
ui->downloadButton->show();
|
||||
|
@ -164,11 +164,11 @@ void DownloadItem::install(int t)
|
||||
|
||||
ui->widget_spinner->hide();
|
||||
DownloadItem::isInstall = false;
|
||||
emit finished();
|
||||
});
|
||||
emit finished();
|
||||
// emit finished();
|
||||
qDebug()<<ui->label_filename->text().toUtf8();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DownloadItem::on_pushButton_install_clicked()
|
||||
|
Loading…
x
Reference in New Issue
Block a user