From a0c14e73976ac5065e47105b2a9b7d925251bb50 Mon Sep 17 00:00:00 2001 From: Pluto Date: Mon, 27 Jun 2022 15:52:27 +0000 Subject: [PATCH] =?UTF-8?q?!48=20widget:=20=E6=A3=80=E6=9F=A5cdn=E7=8A=B6?= =?UTF-8?q?=E5=86=B5=E5=9C=A8=E4=B8=8B=E8=BD=BD=E5=BC=80=E5=A7=8B=E5=89=8D?= =?UTF-8?q?=E6=A3=80=E6=B5=8B,=E4=B8=8D=E5=A0=B5=E5=A1=9Eui=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=20*=20widget:=20=E6=A3=80=E6=9F=A5cdn=E7=8A=B6?= =?UTF-8?q?=E5=86=B5=E5=9C=A8=E4=B8=8B=E8=BD=BD=E5=BC=80=E5=A7=8B=E5=89=8D?= =?UTF-8?q?=E6=A3=80=E6=B5=8B,=E4=B8=8D=E5=A0=B5=E5=A1=9Eui=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=20*=20Merge=20remote-tracking=20branch=20'upstream/ma?= =?UTF-8?q?ster'=20*=20readme:=20=E4=BF=AE=E6=AD=A3=20ubuntu=20=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E8=AF=B4=E6=98=8E=20*=20download:=20?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E8=BD=AF=E4=BB=B6=E6=BA=90=E7=9A=84=E6=9C=89?= =?UTF-8?q?=E6=95=88=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/widget.cpp b/src/widget.cpp index 02d866e..d354948 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -47,11 +47,6 @@ Widget::Widget(DBlurEffectWidget *parent) : httpClient = new AeaQt::HttpClient; - QtConcurrent::run([=]() - { - downloadController = new DownloadController(this); // 并发下载 - }); - connect(ui->menu_main, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(0);}); connect(ui->menu_network, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(1);}); @@ -672,6 +667,7 @@ void Widget::startRequest(QUrl url, QString fileName) isdownload = true; download_list[allDownload - 1].free = false; + downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化 connect(downloadController, &DownloadController::downloadProcess, this, &Widget::updateDataReadProgress); connect(downloadController, &DownloadController::downloadFinished, this, &Widget::httpFinished); connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);});