fix:应用商店退出时,aria2c仍然在运行

This commit is contained in:
柚子 2022-12-13 19:37:46 +08:00
parent eb00159691
commit 922cb6a34f
3 changed files with 3 additions and 2 deletions

@ -138,7 +138,7 @@ void DownloadController::startDownload(const QString &url)
command.append(aria2NoSeeds.toUtf8()); command.append(aria2NoSeeds.toUtf8());
} }
qDebug() << command; qDebug() << command;
auto cmd = new QProcess(); auto cmd = new QProcess(this);
cmd->setProcessChannelMode(QProcess::MergedChannels); cmd->setProcessChannelMode(QProcess::MergedChannels);
cmd->setProgram("aria2c"); cmd->setProgram("aria2c");
cmd->setArguments(command); cmd->setArguments(command);

@ -37,7 +37,6 @@ private:
{ {
normal, normal,
hover, hover,
fromRoundedCornersToRounded,//从圆角变成圆形
openProgress, openProgress,
closeProgress, closeProgress,
recovery recovery

@ -51,6 +51,8 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) :
DownloadListWidget::~DownloadListWidget() DownloadListWidget::~DownloadListWidget()
{ {
downloadController->stopDownload();
delete downloadController;
delete ui; delete ui;
} }
void DownloadListWidget::clearItem() void DownloadListWidget::clearItem()