添加多个通知,修复下载进度条过长问题

This commit is contained in:
2022-12-12 14:34:29 +08:00
parent ff84576aab
commit 0fea4c13ef
4 changed files with 4 additions and 2 deletions

View File

@@ -319,7 +319,7 @@ void AppIntoPage::on_pushButton_3_clicked()
ui->pushButton_3->hide(); ui->pushButton_3->hide();
updatesEnabled(); updatesEnabled();
//sendNotification(tr("Uninstall succeeded")); Utils::sendNotification("spark-store",tr("Spark Store"),tr("Uninstall succeeded"));
} }
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);

View File

@@ -8,6 +8,7 @@
#include <QSettings> #include <QSettings>
#include <QtConcurrent> #include <QtConcurrent>
#include "../backend/sparkapi.h" #include "../backend/sparkapi.h"
#include "utils/utils.h"
#define TMP_PATH "/tmp/spark-store" #define TMP_PATH "/tmp/spark-store"
namespace Ui { namespace Ui {

View File

@@ -125,6 +125,7 @@ void DownloadListWidget::httpFinished() // 完成下载
isBusy = false; isBusy = false;
downloaditemlist[nowDownload - 1]->readyInstall(); downloaditemlist[nowDownload - 1]->readyInstall();
downloaditemlist[nowDownload - 1]->free = true; downloaditemlist[nowDownload - 1]->free = true;
Utils::sendNotification("spark-store",tr("Spark Store"),tr("The download is complete. Please click the download button on the title Bar to open the download list for installation"));
emit downloadFinished(); emit downloadFinished();
if(nowDownload < allDownload) if(nowDownload < allDownload)
{ {

View File

@@ -9,7 +9,7 @@
#include "widgets/common/downloaditem.h" #include "widgets/common/downloaditem.h"
#include "backend/sparkapi.h" #include "backend/sparkapi.h"
#include "backend/downloadworker.h" #include "backend/downloadworker.h"
#include "utils/utils.h"
DWIDGET_USE_NAMESPACE DWIDGET_USE_NAMESPACE
namespace Ui { namespace Ui {
class DownloadListWidget; class DownloadListWidget;