mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-18 03:22:20 +08:00
fix: 删除不应该删除的指针造成闪退
This commit is contained in:
parent
a3e1d19ac3
commit
22b1d66c07
src/widgets
@ -1,7 +1,6 @@
|
||||
#include "basewidgetopacity.h"
|
||||
#include "utils/widgetanimation.h"
|
||||
#include "utils/utils.h"
|
||||
#include "widgets/downloadlistwidget.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
|
@ -170,18 +170,15 @@ void DownloadListWidget::httpFinished() // 完成下载
|
||||
toDownload -= 1; // 安装完以后减少待安装数目
|
||||
qDebug() << "Download: 还没有下载的数目:" << toDownload;
|
||||
|
||||
if(toDownload == 0){
|
||||
if (toDownload == 0)
|
||||
{
|
||||
Application *app = qobject_cast<Application *>(qApp);
|
||||
MainWindow *mainWindow = app->mainWindow();
|
||||
if(mainWindow->isCloseWindowAnimation() == true){
|
||||
qDebug()<< "Download: 后台安装结束,退出程序";
|
||||
if (mainWindow->isCloseWindowAnimation() == true)
|
||||
{
|
||||
qDebug() << "Download: 后台安装结束,退出程序";
|
||||
qApp->quit();
|
||||
}
|
||||
else{
|
||||
delete app;
|
||||
delete mainWindow;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
downloaditemlist[nowDownload - 1]->free = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user