From d7f0ee983b9d07c07fdcff7d824418ed4155fc1a Mon Sep 17 00:00:00 2001 From: uniartisan Date: Wed, 12 Oct 2022 09:31:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9oss=E8=BF=9B=E8=A1=8CURL?= =?UTF-8?q?=E8=BD=AC=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/downloadworker.cpp | 2 +- src/widget.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/downloadworker.cpp b/src/downloadworker.cpp index a2069aa..95c9ef6 100644 --- a/src/downloadworker.cpp +++ b/src/downloadworker.cpp @@ -116,7 +116,7 @@ void DownloadController::startDownload(const QString &url) else{ for (int i = 0; i < domains.size(); i++) { - command.append(replaceDomain(url, domains.at(i)).toUtf8()); + command.append(replaceDomain(url, domains.at(i)).replace("+","%2B").toUtf8()); //对+进行转译,避免oss出错 } } diff --git a/src/widget.cpp b/src/widget.cpp index 910615d..c5150ca 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1303,6 +1303,7 @@ void Widget::on_webEngineView_urlChanged(const QUrl &arg1) ui->stackedWidget->setCurrentIndex(2); qDebug() << "程序跳转链接地址:" << arg1; + QString url = arg1.toString(); /* load.cancel(); // 打开并发加载线程前关闭正在执行的线程 @@ -1313,7 +1314,7 @@ void Widget::on_webEngineView_urlChanged(const QUrl &arg1) */ appinfoLoadThread.requestInterruption(); appinfoLoadThread.wait(100); - appinfoLoadThread.setUrl(arg1); + appinfoLoadThread.setUrl(url.replace("+","%2B")); //对+进行转译,避免oss出错 appinfoLoadThread.start(); } }