modify:修改版本号检测地址
This commit is contained in:
+14
-1
@@ -13,7 +13,8 @@
|
||||
|
||||
#include <private/qzipreader_p.h>
|
||||
|
||||
QString CHECK_URL = QStringLiteral("https://gitea.tianzd.cn/TianZD/deploy/raw/branch/master/%1/updates.json");
|
||||
// QString CHECK_URL = QStringLiteral("https://gitea.tianzd.cn/TianZD/deploy/raw/branch/master/%1/updates.json");
|
||||
QString CHECK_URL = QStringLiteral("https://easy.tianzd.cn/app/%1/updates.json");
|
||||
//QString DOWNLOAD_URL = QStringLiteral("https://update.tianzd.cn/deploy/");
|
||||
QString PLATFORM = "windows";
|
||||
QString APPVERSION = "";
|
||||
@@ -166,6 +167,18 @@ void UpdaterDialog::on_btn_check_clicked()
|
||||
|
||||
const QString url = CHECK_URL.arg(APPNAME);
|
||||
QNetworkRequest request{QUrl(url)};
|
||||
// 用户名和密码
|
||||
QString user = "TianZD";
|
||||
QString password = "P@ssw0rd!!!";
|
||||
|
||||
// Basic Auth: base64(username:password)
|
||||
QByteArray userPassword = QString("%1:%2").arg(user, password).toUtf8();
|
||||
QByteArray authHeader = "Basic " + userPassword.toBase64();
|
||||
|
||||
request.setRawHeader("Authorization", authHeader);
|
||||
|
||||
// 建议允许重定向
|
||||
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||
m_pManager->get(request);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user