Skip to content

Commit b9f6226

Browse files
committed
fix: 私有化更新&更新传递&http限速在线配置功能第五轮bug修复
修复以下问题: 【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第六轮测试】服务端支持P2P,终端接入成功后,控制中心-传递优化开关应该置灰并不可关闭 【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】勾选传递优化子配置项的上传限速和下载限速复选框,再次去勾选复选框,限速值变成了104857 【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】修改传递优化上传下载限速的状态或者值,重新打开控制中心,传递优化上传下载限速位置发生变化 Log:如上所述 Bug:https://pms.uniontech.com/bug-view-357875.html https://pms.uniontech.com/bug-view-358203.html https://pms.uniontech.com/bug-view-357291.html Influence:影响私有化更新&更新传递&http限速在线配置功能
1 parent 537e84f commit b9f6226

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/dcc-update-plugin/operation/updatedatastructs.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ inline QString transferDeliveryConfigToLastoreDeliveryConfig(const QString& deli
316316
LastoreUpgradeSpeedLimitConfig lastoreDeliveryConfig;
317317
lastoreDeliveryConfig.isOnlineSpeedLimit = UpgradeSpeedLimitConfig::fromJson(deliveryConfig.toUtf8()).ifInOnlineLimit();
318318
lastoreDeliveryConfig.speedLimitEnabled = UpgradeSpeedLimitConfig::fromJson(deliveryConfig.toUtf8()).shouldLimitRate();
319-
lastoreDeliveryConfig.limitSpeed = QString::number(UpgradeSpeedLimitConfig::fromJson(deliveryConfig.toUtf8()).currentRate);
319+
if (lastoreDeliveryConfig.isOnlineSpeedLimit) {
320+
lastoreDeliveryConfig.limitSpeed = QString::number(UpgradeSpeedLimitConfig::fromJson(deliveryConfig.toUtf8()).currentRate);
321+
} else {
322+
lastoreDeliveryConfig.limitSpeed = QString::number(UpgradeSpeedLimitConfig::fromJson(deliveryConfig.toUtf8()).limitRate);
323+
}
320324
return lastoreDeliveryConfig.toJson();
321325
}
322326

src/dcc-update-plugin/qml/UpdateSetting.qml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ DccObject {
173173
parentName: "updateSettingsPage"
174174
displayName: qsTr("Update Type")
175175
weight: 10
176+
visible: !dccData.model().isPrivateUpdate
176177
}
177178

178179
DccObject {
@@ -181,6 +182,7 @@ DccObject {
181182
parentName: "updateSettingsPage"
182183
weight: 20
183184
pageType: DccObject.Item
185+
visible: !dccData.model().isPrivateUpdate
184186
page: DccGroupView {
185187
height: implicitHeight + 10
186188
spacing: 0
@@ -245,15 +247,15 @@ DccObject {
245247

246248
DccObject {
247249
id: advancedSetting
248-
property bool showDetails: false
250+
property bool showDetails: dccData.model().isPrivateUpdate
249251
name: "advancedSettingTitle"
250252
parentName: "updateSettingsPage"
251253
displayName: qsTr("Advanced Settings")
252254
weight: 30
253255
pageType: DccObject.Item
254256
page: RowLayout {
255257
Component.onDestruction: {
256-
advancedSetting.showDetails = false
258+
advancedSetting.showDetails = false || dccData.model().isPrivateUpdate
257259
}
258260
DccLabel {
259261
property D.Palette textColor: D.Palette {
@@ -338,7 +340,7 @@ DccObject {
338340
displayName: qsTr("Upgrade Delivery")
339341
description: qsTr("When enabled, your device may share previously downloaded system updates with other devices on your local network.When you turn it off, cached files from update delivery will be cleared during the next restart.")
340342
weight: 10
341-
enabled: !dccData.model().updateProhibited
343+
enabled: !dccData.model().isPrivateUpdate
342344
pageType: DccObject.Editor
343345
page: D.Switch {
344346
id: upgradeDeliverySwitch
@@ -467,7 +469,7 @@ DccObject {
467469
parentName: "upgradeDeliveryGrp"
468470
displayName: qsTr("Upgrade Delivery Download Limit Setting")
469471
visible: dccData.model().upgradeDeliveryEnable
470-
weight: 20
472+
weight: 30
471473
enabled: !dccData.model().upgradeDownloadSpeedIsOnline
472474
pageType: DccObject.Item
473475
Connections {

0 commit comments

Comments
 (0)