mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-17 01:21:36 +08:00
sync: fix: crash when installation complete
Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
@@ -285,8 +285,10 @@ void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dw = w;
|
dw = w;
|
||||||
connect(w, &DownloadListWidget::downloadFinished, [=]()
|
connect(w, &DownloadListWidget::downloadFinished, this, [=]() {
|
||||||
{ isDownloading(SparkAPI::getServerUrl() + SparkAPI::getArchDir() + spk.path() + "/" + info["Filename"].toString()); });
|
isDownloading(SparkAPI::getServerUrl() + SparkAPI::getArchDir() + spk.path() + "/" + info["Filename"].toString());
|
||||||
|
},
|
||||||
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppIntoPage::initUI()
|
void AppIntoPage::initUI()
|
||||||
@@ -484,7 +486,10 @@ void AppIntoPage::on_downloadButton_clicked()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
|
connect(item, &DownloadItem::finished, this, [=]() {
|
||||||
|
isDownloading(downloadUrl);
|
||||||
|
},
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
item->install(0);
|
item->install(0);
|
||||||
isDownloading(downloadUrl);
|
isDownloading(downloadUrl);
|
||||||
@@ -505,7 +510,10 @@ void AppIntoPage::on_downloadButton_clicked()
|
|||||||
item->reinstall = true;
|
item->reinstall = true;
|
||||||
}
|
}
|
||||||
ui->downloadButton->setEnabled(false);
|
ui->downloadButton->setEnabled(false);
|
||||||
connect(item, &DownloadItem::finished, [=]() { isDownloading(downloadUrl); });
|
connect(item, &DownloadItem::finished, this, [=]() {
|
||||||
|
isDownloading(downloadUrl);
|
||||||
|
},
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
isDownloading(downloadUrl);
|
isDownloading(downloadUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user