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());
}
qDebug() << command;
auto cmd = new QProcess();
auto cmd = new QProcess(this);
cmd->setProcessChannelMode(QProcess::MergedChannels);
cmd->setProgram("aria2c");
cmd->setArguments(command);

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

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