需求:在安装结束后将安装状态发送系统通知

This commit is contained in:
柚子 2022-12-13 12:43:58 +08:00
parent 2ed2512d6c
commit a2cb7ef112

@ -59,7 +59,6 @@ void DownloadItem::readyInstall()
{
if(!close)
{
Utils::sendNotification("spark-store",tr("Spark Store"),tr("The download is complete."));
ui->progressBar->hide();
ui->pushButton_install->setEnabled(true);
ui->pushButton_install->show();
@ -139,6 +138,7 @@ void DownloadItem::install(int t)
if(error == 0)
{
ui->pushButton_install->hide();
Utils::sendNotification("spark-store",tr("Spark Store"),tr("Installation complete."));
ui->label_2->setText(tr("Finish"));
ui->pushButton_3->show();
}
@ -146,12 +146,14 @@ void DownloadItem::install(int t)
{
ui->pushButton_install->show();
ui->pushButton_install->setText(tr("Retry"));
Utils::sendNotification("spark-store",tr("Spark Store"),tr("Error happened in dpkg progress , you can try it again."));
ui->label_2->setText(tr("Error happened in dpkg progress , you can try it again"));
ui->pushButton_3->show();
}
if(notRoot)
{
Utils::sendNotification("spark-store",tr("Spark Store"),tr("dpkg progress had been abortedyou can retry installation."));
ui->label_2->setText(tr("dpkg progress had been abortedyou can retry installation"));
ui->pushButton_install->show();
ui->pushButton_3->hide();