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