Skip to content

Merge to upstream master#287

Merged
ut005973 merged 15 commits into
linuxdeepin:masterfrom
ut005973:merge-to-upstream-master
Apr 28, 2026
Merged

Merge to upstream master#287
ut005973 merged 15 commits into
linuxdeepin:masterfrom
ut005973:merge-to-upstream-master

Conversation

@ut005973
Copy link
Copy Markdown
Contributor

No description provided.

ut005973 added 14 commits March 24, 2026 16:13
…ith private update module

Integrate the private update logic from v20 into the v25 control center update module.
1. Functionality is enabled based on the `intranet-update` configuration item under `lastore-daemon`. When disabled, the public update interface of the control center is displayed; when enabled, the interface switches to the private update interface.
2. The private update interface is largely similar to the public interface, with the following key differences:
   a. The update settings entry is hidden — enterprise-level update users are not allowed to modify update-related configurations.
   b. The process from checking for updates to downloading is atomic. Enterprise update users cannot refuse downloads, and downloads cannot be canceled during the process.
   c. After download completion, a re-check button is added.
   d. For non-mandatory updates, users can choose the update method after download completion: update immediately or update after shutdown.
   e. A dedicated private update tray is added to provide more detailed download/update status information. The tray is loaded only when the private update switch is enabled.

Log: Integrate v20 private update logic into v25
Story: https://pms.uniontech.com/story-view-40191.html
Influence: Added private update logic to the control center update module

feat: 【更新客户端】更新客户端后端合并-控制中心更新客户端合入私有化更新模块逻辑

v20的私有化更新逻辑合入v25控制中心更新模块
1.通过lastore-daemon下面的intranet-update配置项决定功能私有化功能是否开启,未开启时仍为控制中心公网更新模块界面,开启后切换为私有化更新界面
2.私有化更新界面与公网界面大致相同,主要有以下区别点:
a.屏蔽更新设置入口,企业级更新的用户不允许私自修改更新相关配置
b.私有化更新的检查更新到下载流程为原子化操作,企业及更新用户无拒绝下载的权利,下载过程中不允许取消
c.下载完成后添加重复检查按钮
d.若为非强制更新类型的任务,下载完成后允许用户自行决定更新方式,立即更新or关机后更新
e.添加私有化专属托盘,提供更详细的下载更新状态,仅在私有化开关开启时加载托盘

Log: v20私有化更新合入v25
Story: https://pms.uniontech.com/story-view-40191.html
Influence: 控制中心更新模块新增私有化更新逻辑
…nto Control Center update client

Integrate the update delivery logic from v20 into the v25 Control Center update module:

Add an update delivery master switch in the Control Center update advanced settings interface. When the switch is enabled, the interface displays two sub-items: Update Delivery - Upload Speed Limit and Update Delivery - Download Speed Limit. Each sub-item has its own control switch and speed limit input field. Simultaneously, call the relevant SetP2pEnable interface of lastore-daemon, which will attempt to start the upgrade-delivery system service during the next update check of lastore.

The switches and input fields for Update Delivery - Upload Speed Limit and Update Delivery - Download Speed Limit independently control the enabling/disabling of upload/download speed limits and their specific values. These values are set by calling the SetDeliveryUploadSpeedLimit and SetDeliveryDownloadSpeedLimit interfaces of lastore-daemon, which are then applied by lastore.

The update delivery speed limit configuration supports backend-driven busy/idle time speed limit policies via the update platform. When such policies are active, the Control Center will gray out the Update Delivery - Upload Speed Limit and Update Delivery - Download Speed Limit sub-items accordingly, preventing user modifications.

Each operation on the master switch triggers a refresh of the status values for various sub-items. The status values are read from the upgrade-delivery service.

Log: Integrate v20 update delivery functionality into v25
Task: https://pms.uniontech.com/task-view-387713.html
Influence: New update delivery logic added to the Control Center update module

feat: 【更新传递】控制中心更新客户端合入更新传递相关功能

v20的更新传递逻辑合入v25控制中心更新模块
1.添加更新传递总开关在控制中心更新高级设置界面。当开关打开时,界面展示更新传递-上传限速、更新传递-下载限速两个子项,每个子项有各自的控制开关和限速值输入框,同时调用lastore-daemon的SetP2pEnable相关接口,在lastore的下次检查更新时尝试拉起upgrade-delivery系统服务
2.更新传递-上传限速、更新传递-下载限速两个子项的开关和输入框各自控制上传、下载限速的开启和关闭以及具体数值,具体通过调用lastore-daemon的SetDeliveryUploadSpeedLimit和SetDeliveryDownloadSpeedLimit接口交由lastore来实际设置值。
3.更新传递的限速配置支持通过更新平台后端下发忙闲时的限速策略,此时控制中心会根据这一策略适时置灰更新传递-上传限速、更新传递-下载限速两个子项,禁止用户修改
4.每次操作总开关时会适时的刷新各种子项的状态值,具体是从upgrade-delivery服务中读取对应的属性值

Log: v20更新传递功能合入v25
Task: https://pms.uniontech.com/task-view-387713.html
Influence: 控制中心更新模块新增更新传递逻辑
1. After the server issues a forced update - update policy during shutdown/restart, the tray icon tooltip does not prompt after the terminal downloads the update resources
2. After the client update fails, the control center should not display the continue update button
3. After the client update fails, there is no prompt in system messages or the taskbar tray icon
4. After the client completes the update, the taskbar icon tooltip display does not meet requirements
5. After the client downloads the update patch, clicking update should not display "Update after shutdown"
6. After the client system upgrade succeeds, the control center - system update interface does not display the private update version number

Log: Resolve the above issues
Bug: https://pms.uniontech.com/bug-view-355377.html
https://pms.uniontech.com/bug-view-354737.html
https://pms.uniontech.com/bug-view-354735.html
https://pms.uniontech.com/bug-view-354293.html
https://pms.uniontech.com/bug-view-354243.html
https://pms.uniontech.com/bug-view-354241.html
Influence: Affects the interface display of control center private updates and the private update tray display

fix: V25版本私有化更新-修复六个问题

1.服务端下发强制更新-关机重启时更新策略,终端下载完更新资源后,托盘图标tips没有提示
2.客户端更新失败后,控制中心不应该展示继续更新按钮
3.客户端更新失败后,系统消息和任务栏托盘图标没有提示
4.客户端完成更新,任务栏图标tips显示与需求不符
5.客户端下载完成更新补丁,点击更新,不应该展示“关机后更新”
6.客户端系统升级成功,控制中心-系统更新界面未展示私有化更新版本号

Log: 解决上述问题
Bug: https://pms.uniontech.com/bug-view-355377.html
https://pms.uniontech.com/bug-view-354737.html
https://pms.uniontech.com/bug-view-354735.html
https://pms.uniontech.com/bug-view-354293.html
https://pms.uniontech.com/bug-view-354243.html
https://pms.uniontech.com/bug-view-354241.html
Influence: 影响控制中心私有化更新的界面展示和私有化托盘的展示
1. Added getDetailInfos() method to UpdateListModel to expose detailed
update information including name, updateTime, info, link, and vulLevel
2. Modified UpdateLogHelper to always add detail info for system updates
regardless of version number ending, removing the previous restriction
that filtered out professional edition versions ending with '0'
3. Enhanced UpdateList.qml with expandable/collapsible detail sections
showing version-specific information with proper styling and theme
support
4. Added "View More" and "Collapse" buttons to toggle detail visibility
for items with available detail information
5. Updated copyright years from 2024 to 2024-2026 across modified files

Log: Added expandable update details view with version-specific
information display

Influence:
1. Test clicking "View More" button on update items with available
details
2. Verify detail information displays correctly including version,
release time, and description
3. Test "Collapse" button functionality to hide details
4. Verify theme compatibility (light/dark mode) for all new UI elements
5. Test that all system update versions now show details regardless of
version number ending
6. Verify detail information structure and data mapping from backend
model
7. Test with update items that have no detail information to ensure
"View More" button is hidden

feat: 添加更新详情展开功能并修复版本显示问题

1. 在 UpdateListModel 中添加 getDetailInfos() 方法,用于公开详细的更新信
息,包括名称、更新时间、信息、链接和安全级别
2. 修改 UpdateLogHelper,始终为系统更新添加详细信息,移除了之前过滤
以'0'结尾的专业版版本的限制
3. 增强 UpdateList.qml,添加可展开/折叠的详情部分,显示版本特定信息,并
支持适当的样式和主题
4. 添加"查看更多"和"收起"按钮,用于切换具有可用详细信息项目的可见性
5. 将修改文件的版权年份从 2024 更新为 2024-2026

Log: 新增可展开的更新详情视图,显示版本特定信息

Influence:
1. 测试在有可用详情的更新项目上点击"查看更多"按钮
2. 验证详细信息是否正确显示,包括版本、发布时间和描述
3. 测试"收起"按钮功能以隐藏详细信息
4. 验证所有新UI元素的主题兼容性(浅色/深色模式)
5. 测试所有系统更新版本现在都显示详细信息,无论版本号结尾如何
6. 验证从后端模型到前端的数据映射和结构
7. 测试没有详细信息的更新项目,确保"查看更多"按钮被隐藏

PMS: TASK-38625
…tasks when no updates available

Scheduled and shutdown update tasks may have no updatable content. In such cases, the tray should not display scheduled or shutdown update prompts. Filter this scenario by checking the update-status state from lastore.

Log: Resolve the above issue
Bug: https://pms.uniontech.com/bug-view-354163.html
Influence: Affects tray tooltip text for empty shutdown & scheduled update tasks

fix: V25版本私有化更新-修复定时&关机任务无更新内容是托盘提示文案有误的问题

定时&关机更新任务可能没有可更新内容,此时托盘不应该展示定时&关机更新提示。通过添加lastore的update-status状态判断过滤此场景

Log: 解决上述问题
Bug: https://pms.uniontech.com/bug-view-354163.html
Influence: 影响在空的关机&定时更新任务时托盘的提示文案
Add missing animation code that was not merged properly

Log: Resolve the above issue
Bug: https://pms.uniontech.com/bug-view-354225.html
Influence: Affects the tray animation status when there are update contents

fix: V25版本私有化更新-托盘添加更新动画

和入部分漏和入的动画代码

Log: 解决上述问题
Bug: https://pms.uniontech.com/bug-view-354225.html
Influence: 影响有更新内容时的托盘动画状态
Standardize comments in private-lastore-tray, clean up unused code and includes,
Fix warnings exposed during the refactor
Fix tray icon ghosting during blinking

Log: Clean up code structure and eliminate compile warnings
Task: https://pms.uniontech.com/task-view-387713.html
Influence: No functional changes, only affects code readability and build cleanliness

chore: V25版本私有化更新-注释与代码整理

统一 private-lastore-tray 目录下注释风格,清理无用代码与无效引用,
修复整理过程中暴露的编译告警问题
修复托盘图标闪烁时有重影的问题

Log: 规范注释与日志文案,清理未使用代码,消除编译告警
Task: https://pms.uniontech.com/task-view-387713.html
Influence: 不涉及功能变更,仅影响代码可读性与编译洁净度
…dden by local actions after it is fetched (linuxdeepin#273)

1. The settings UI triggers a write once on initial display, which may overwrite the online configuration. Suppress the initial write triggered when the page is first shown.
2. Show a failure dialog when operations on the update delivery switch or related upload/download speed limit settings fail, improving user awareness and feedback in exception scenarios.
3. Add range hint for update transfer speed limit input box

Log: As described above
Bug: https://pms.uniontech.com/bug-view-355949.html
Influence: Affects the update delivery switch state and failure feedback for upload/download speed limit setting operations.

fix: 修复v25下载限速在线配置在获取在线配置后被本地操作覆盖的问题

1.界面首次展示时会触发一次设置代码,可能导致在线配置被覆盖,屏蔽首次展示界面是触发设置
2.在更新传递开关及相关限速设置操作失败时,弹出失败提示弹窗,提升异常场景下的用户感知与反馈。
3.添加更新传递限速输入框范围提示

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-355949.html
Influence:影响更新传递开关状态,以及上传/下载限速设置失败时的提示反馈
1. Fix incorrect tray copy caused by failed tasks not being cleared in download and update failure scenarios.
2. Fix the issue where the control center cannot dynamically refresh its copy after a scheduled update is fetched and the download is completed.

Log: As described above
Bug: https://pms.uniontech.com/bug-view-355929.html
https://pms.uniontech.com/bug-view-354735.html
Influence: Affects the copy shown in the scheduled update control center and the tray copy when tasks fail.

fix: 修复托盘和控制中心的文案问题

1.修复在下载和更新失败的场景下因为failed任务未清除导致的托盘文案错误问题
2.修复获取定时更新后下载完成时控制中心无法动态刷新文案的问题

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-355929.html
https://pms.uniontech.com/bug-view-354735.html
Influence:影响定时更新控制中心的文案和任务失败时托盘的文案
…#277)

Fixed the following issues

When the server triggers a scheduled update or an update upon shutdown/restart, the Control Center should gray out the "Update Now" button after the client successfully downloads the update.

On the Update Settings page, the hint message below the delivery optimization configuration item is missing.

After the client connects to the enterprise update management system, the delivery configuration item in Control Center → System Update → Update Settings should be hidden.

When the update delivery checkbox is not selected, the input fields for upload and download speed limits should be grayed out.

After turning on the update delivery configuration switch and restarting the system, the switch appears off.

The name of the update delivery configuration item should be changed to "Delivery Optimization".

The upload and download speed limit input fields in the delivery optimization configuration item are very difficult to interact with.

When delivery optimization settings fail to enable, a retry pop-up appears, but the pop-up display does not match requirements.

The download speed limit setting does not appear when first opened.

After changing the checkbox states of the upload and download speed limit configuration items under delivery optimization, navigating away and back to the Update Settings page does not remember the states.

On the Update Settings page, when the download speed limit switch is turned on and the input field contains "1234567", the maximum allowed number of digits does not match requirements.

On the Update Settings page, when the download speed limit switch is turned on and a number below 10 is entered in the input field, an error message should be displayed.

On the Update Settings page, when the download speed limit switch is turned on and a number below 10 is entered, the displayed error message does not match requirements.

Log: As above
Bugs:
https://pms.uniontech.com/bug-view-355953.html
https://pms.uniontech.com/bug-view-356031.html
https://pms.uniontech.com/bug-view-356189.html
https://pms.uniontech.com/bug-view-356281.html
https://pms.uniontech.com/bug-view-356331.html
https://pms.uniontech.com/bug-view-356333.html
https://pms.uniontech.com/bug-view-356289.html
https://pms.uniontech.com/bug-view-357119.html
https://pms.uniontech.com/bug-view-356853.html
https://pms.uniontech.com/bug-view-357211.html
https://pms.uniontech.com/bug-view-357201.html
https://pms.uniontech.com/bug-view-357195.html
https://pms.uniontech.com/bug-view-357189.html

Influence: Affects the interaction logic of the Control Center in privateized update scenarios.

fix: 私有化更新-前端第三轮bug修复

修复如下问题:
1.服务端下发定时更新或者关机重启时更新,客户端下载成功之后,控制中心应该将立即更新按钮置灰
2.更新设置页面,传递优化配置项下方提示信息缺失
3.客户端接入企业更新管理系统后,控制中心-系统更新-更新设置中更新传递配置项应该隐藏
4.没有勾选更新传递上传和下载限速的值输入框建议置灰处理
5.更新传递配置项开关打开,重启系统,开关是关闭状态
6.更新传递配置项名字需要修改为传递优化
7.传递优化配置项的上传和下载限速值,交互特别难用
8.传递优化设置项开启失败,出现重试弹窗,弹窗展示与需求不一致
9.下载限速首次打开,不显示限速设置
10.改变传递优化配置项的上传限速配置项和下载限速配置项复选框状态,切换模块,再次回到更新设置页面,状态没记住
11.更新设置页面,下载限速开关开启,输入框输入1234567,最大允许输入位数与需求不一致
12.更新设置页面,下载限速开关开启,输入框输入10以下数字,需要提示错误信息
13.更新设置页面,下载限速开关开启,输入框输入10以下的数字,提示错误信息与需求不一致

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-355953.html
https://pms.uniontech.com/bug-view-356031.html
https://pms.uniontech.com/bug-view-356189.html
https://pms.uniontech.com/bug-view-356281.html
https://pms.uniontech.com/bug-view-356331.html
https://pms.uniontech.com/bug-view-356333.html
https://pms.uniontech.com/bug-view-356289.html
https://pms.uniontech.com/bug-view-357119.html
https://pms.uniontech.com/bug-view-356853.html
https://pms.uniontech.com/bug-view-357211.html
https://pms.uniontech.com/bug-view-357201.html
https://pms.uniontech.com/bug-view-357195.html
https://pms.uniontech.com/bug-view-357189.html
Influence:影响私有化更新场景下的控制中心交互逻辑
…ery, and online HTTP rate limiting configuration (linuxdeepin#278)

Fixed the following issues:

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] When toggling the Delivery Optimization setting on/off, clicking retry can successfully enable it again.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] The pop-up prompt and button names for Delivery Optimization sub-setting failures do not match the requirements.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] When enabling/disabling the Delivery Optimization setting fails, the retry pop-up message and button names are inconsistent with the requirements.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] After modifying the download rate limit value and restarting the system, the download rate limit value reverts to the default 1024 in the update settings page.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] After checking the two Delivery Optimization configuration checkboxes and clicking the two input fields, restarting the control center changes the values of the two input fields to 104857 in the update settings page.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] Multiple instances of inconsistent copywriting for Delivery Optimization features compared to requirements.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] The English and Traditional Chinese names of Delivery Optimization sub-configurations need to be consistent with Simplified Chinese.

[V25 2500U1][Update Management System][Control Center Update Client][Fifth Round Test] The English and Traditional Chinese names of Delivery Optimization configurations need to be consistent with Simplified Chinese.

[V25 2500U1][Update Management System][Enterprise Update Management System][Fifth Round Test] After the server delivers Delivery Optimization rate limit configurations, the client can still edit the rate limit values.

[V25 2500U1][Update Management System][Control Center Update Client][Fourth Round Test] On the update settings page, when the download rate limit switch is enabled and "1234567" is entered in the input field, the maximum allowed input length does not match the requirements.

[V25 2500U1][Update Management System][Control Center Update Client][Fourth Round Test] On the update settings page, after enabling the download rate limit switch and restarting, the download rate limit switch is turned off.

[V25 2500U1][Update Management System][Enterprise Update Management System][Fourth Round Test] The busy-time rate limit setting does not take effect.

[V25 2500U1][Update Management System][Public Update Platform][First Round Test] The current baseline version of the terminal is 2522, and the target baseline version is 2551. The control center does not display the baseline log correctly.

[V25 2500U1][Update Management System][Public Update Platform][First Round Test] When performing a cross-version update for the community edition, not all intermediate version update logs are displayed; only the target baseline log is shown.

Log: As above
Bug:
https://pms.uniontech.com/bug-view-357761.html
https://pms.uniontech.com/bug-view-357759.html
https://pms.uniontech.com/bug-view-357757.html
https://pms.uniontech.com/bug-view-357713.html
https://pms.uniontech.com/bug-view-357675.html
https://pms.uniontech.com/bug-view-357657.html
https://pms.uniontech.com/bug-view-357651.html
https://pms.uniontech.com/bug-view-357649.html
https://pms.uniontech.com/bug-view-357561.html
https://pms.uniontech.com/bug-view-357201.html
https://pms.uniontech.com/bug-view-357171.html
https://pms.uniontech.com/bug-view-356935.html
https://pms.uniontech.com/bug-view-354863.html
https://pms.uniontech.com/bug-view-354303.html

Influence: Affects privatization update, update delivery, and online HTTP rate limiting configuration features.

fix: 私有化更新&更新传递&http限速在线配置功能第四轮bug修复
修复以下问题:
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化设置项开启关闭时候,点击重试又能开启成功
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化子设置项设置失败弹窗提示和按钮名称与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化设置项开启和关闭失败,出现重试弹窗,弹窗提示信息和按钮名称与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】修改过下载限速的值,重启系统,进入更新设置页面,下载限速的值回复默认1024
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】勾选传递优化两个配置项的复选框,点击两个输入框,重启控制中心,进入更新设置页面,两个输入框的值变成了104857
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化功能多处文案翻译与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化子配置项,英文、繁体中文名称需要和简体中文保持一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化配置项,英文、繁体中文名称需要和简体中文保持一致
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第五轮测试】服务端下发传递优化限速配置后,客户端仍然可以编辑限速值
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】更新设置页面,下载限速开关开启,输入框输入1234567,最大允许输入位数与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】更新设置页面,下载限速开关开启,重启后下载限速开关是关闭状态
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第四轮测试】设置忙时限速未生效
【V25 2500U1】【更新管理系统】【公网更新平台】【第一轮测试】终端当前基线版本号为2522,目标基线版本号为2551,控制中心未正常显示基线日志
【V25 2500U1】【更新管理系统】【公网更新平台】【第一轮测试】社区版跨版本更新时,未显示中间所有的版本更新日志,只显示目标基线更新日志

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-357761.html
https://pms.uniontech.com/bug-view-357759.html
https://pms.uniontech.com/bug-view-357757.html
https://pms.uniontech.com/bug-view-357713.html
https://pms.uniontech.com/bug-view-357675.html
https://pms.uniontech.com/bug-view-357657.html
https://pms.uniontech.com/bug-view-357651.html
https://pms.uniontech.com/bug-view-357649.html
https://pms.uniontech.com/bug-view-357561.html
https://pms.uniontech.com/bug-view-357201.html
https://pms.uniontech.com/bug-view-357171.html
https://pms.uniontech.com/bug-view-356935.html
https://pms.uniontech.com/bug-view-354863.html
https://pms.uniontech.com/bug-view-354303.html
Influence:影响私有化更新&更新传递&http限速在线配置功能
修复以下问题:
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化设置项开启关闭时候,点击重试又能开启成功
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化子设置项设置失败弹窗提示和按钮名称与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化设置项开启和关闭失败,出现重试弹窗,弹窗提示信息和按钮名称与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】修改过下载限速的值,重启系统,进入更新设置页面,下载限速的值回复默认1024
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】勾选传递优化两个配置项的复选框,点击两个输入框,重启控制中心,进入更新设置页面,两个输入框的值变成了104857
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化功能多处文案翻译与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化子配置项,英文、繁体中文名称需要和简体中文保持一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第五轮测试】传递优化配置项,英文、繁体中文名称需要和简体中文保持一致
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第五轮测试】服务端下发传递优化限速配置后,客户端仍然可以编辑限速值
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】更新设置页面,下载限速开关开启,输入框输入1234567,最大允许输入位数与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】更新设置页面,下载限速开关开启,重启后下载限速开关是关闭状态
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第四轮测试】设置忙时限速未生效
【V25 2500U1】【更新管理系统】【公网更新平台】【第一轮测试】终端当前基线版本号为2522,目标基线版本号为2551,控制中心未正常显示基线日志
【V25 2500U1】【更新管理系统】【公网更新平台】【第一轮测试】社区版跨版本更新时,未显示中间所有的版本更新日志,只显示目标基线更新日志

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-357761.html
https://pms.uniontech.com/bug-view-357759.html
https://pms.uniontech.com/bug-view-357757.html
https://pms.uniontech.com/bug-view-357713.html
https://pms.uniontech.com/bug-view-357675.html
https://pms.uniontech.com/bug-view-357657.html
https://pms.uniontech.com/bug-view-357651.html
https://pms.uniontech.com/bug-view-357649.html
https://pms.uniontech.com/bug-view-357561.html
https://pms.uniontech.com/bug-view-357201.html
https://pms.uniontech.com/bug-view-357171.html
https://pms.uniontech.com/bug-view-356935.html
https://pms.uniontech.com/bug-view-354863.html
https://pms.uniontech.com/bug-view-354303.html
Influence:影响私有化更新&更新传递&http限速在线配置功能
…HTTP speed limit online configuration features (linuxdeepin#282)

Fixed the following issues:
[V25 2500U1][Update Management System][Enterprise Update Management System][Sixth Round Testing] When the server supports P2P and the terminal successfully connects, the transfer optimization switch in Control Center should be grayed out and non-closable
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][Public Network] After checking the upload speed limit and download speed limit checkboxes of transfer optimization sub-items, unchecking them again causes the speed limit value to change to 104857
[V25 2500U1][Update Management System][Control Center Update Client][Fourth Round Testing] After modifying the status or value of transfer optimization upload/download speed limits, reopening Control Center causes the transfer optimization upload/download speed limit positions to change
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][Public Network] The English translation of transfer optimization does not match requirements
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][System Update][Public Network] When enabling or disabling transfer optimization settings fails, a retry dialog appears with prompt information and buttons inconsistent with requirements
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][Public Network] When enabling or disabling transfer optimization sub-item settings fails, the dialog display does not match requirements
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][Public Network] When enabling transfer optimization settings fails, the dialog needs to support closing with Esc key
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][Public Network] When enabling or disabling transfer optimization sub-item settings fails, the dialog needs to support closing with Esc key
[V25 2500U1][Update Management System][Control Center Update Client][Sixth Round Testing][System Update][Public Network] The display names of transfer optimization sub-items need to match requirements
[V25 2500U1][Update Management System][Control Center Update Client][First Round Testing][System Update][Public Network] After the client successfully connects, the public network update plugin in the taskbar plugin area is not blocked
[V25 2500U1][Update Management System][Enterprise Update Management System][Sixth Round Testing] After the server authorization file switches from not supporting P2P to supporting P2P, the order of the transfer optimization menu in the client Control Center changes, and it is restored after restart

Log: As above
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
https://pms.uniontech.com/bug-view-358231.html
https://pms.uniontech.com/bug-view-358257.html
https://pms.uniontech.com/bug-view-358321.html
https://pms.uniontech.com/bug-view-358303.html
https://pms.uniontech.com/bug-view-358357.html
https://pms.uniontech.com/bug-view-358365.html
https://pms.uniontech.com/bug-view-354239.html
https://pms.uniontech.com/bug-view-358585.html
Influence: Affects private update & update transfer & HTTP speed limit online configuration features

fix: 私有化更新&更新传递&http限速在线配置功能第五轮bug修复
修复以下问题:
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第六轮测试】服务端支持P2P,终端接入成功后,控制中心-传递优化开关应该置灰并不可关闭
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】勾选传递优化子配置项的上传限速和下载限速复选框,再次去勾选复选框,限速值变成了104857
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第四轮测试】修改传递优化上传下载限速的状态或者值,重新打开控制中心,传递优化上传下载限速位置发生变化
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】传递优化英文翻译与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【系统更新】【公网】传递优化设置项开启或关闭失败,出现重试弹窗,提示信息和按钮与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】传递优化设置项子配置项开启或关闭失败,弹窗展示与需求不一致
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】传递优化设置项开启失败,弹窗需要支持Esc键关闭弹窗
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【公网】传递优化设置项子配置项开启或关闭失败,弹窗需要支持esc关闭操作
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第六轮测试】【系统更新】【公网】传递优化子配置项展示名称需要与需求一致
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第一轮测试】客户端接入成功之后,任务栏插件区域公网更新插件未屏蔽
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第六轮测试】服务端授权文件从不支持P2P切换为支持P2P之后,客户端控制中心传递优化菜单顺序发生变化,重启后恢复

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
https://pms.uniontech.com/bug-view-358231.html
https://pms.uniontech.com/bug-view-358257.html
https://pms.uniontech.com/bug-view-358321.html
https://pms.uniontech.com/bug-view-358303.html
https://pms.uniontech.com/bug-view-358357.html
https://pms.uniontech.com/bug-view-358365.html
https://pms.uniontech.com/bug-view-354239.html
https://pms.uniontech.com/bug-view-358585.html
Influence:影响私有化更新&更新传递&http限速在线配置功能
…HTTP speed limit online configuration features

Fixed the following issues:
[V25 2500U1][Update Management System][Control Center Update Client][Seventh Round Testing][System Update][Public Network] Unchecking transfer optimization sub-items fails - actually unchecking succeeds (issue with failure indication)
[V25 2500U1][Update Management System][Control Center Update Client][Seventh Round Testing][Control Center][System Update][Public Network] In Traditional Chinese environment, when entering invalid values in transfer optimization and download speed limit input fields, the prompt message appears in English
[V25 2500U1][Update Management System][Enterprise Update Management System][Seventh Round Testing] After the terminal has performed an abnormal scheduled update, when the next non-forced update is issued, the Control Center still displays: "System will update at XXX"
[V25 2500U1][Update Management System][Enterprise Update Management System][Seventh Round Testing] When the client receives a shutdown/restart update task and the download is completed, the Control Center should display text: "The system will update when the computer shuts down or restarts"
[V25 2500U1][Update Management System][Enterprise Update Management System][First Round Testing] After the client successfully connects, the public network update plugin in the taskbar plugin area is not blocked
[V25 2500U1][Update Management System][Enterprise Update Management System][Sixth Round Testing] When the server issues idle/busy time client speed limits and the client crosses two different speed limit intervals during download, the taskbar tray icon does not show the prompt "Download speed limit configuration switching in progress, download of update resources will continue after the switch is complete"

Log: As above
Bug: https://pms.uniontech.com/bug-view-358767.html
https://pms.uniontech.com/bug-view-358703.html
https://pms.uniontech.com/bug-view-358841.html
https://pms.uniontech.com/bug-view-358833.html
https://pms.uniontech.com/bug-view-354239.html
https://pms.uniontech.com/bug-view-358183.html
Influence: Affects private update & update transfer & HTTP speed limit online configuration features

fix: 私有化更新&更新传递&http限速在线配置功能第六轮bug修复
修复以下问题:
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第七轮测试】【系统更新】【公网】传递优化设置项子配置项去勾选失败,去勾选成功了
【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第七轮测试】【控制中心】【系统更新】【公网】繁体中文环境,传递优化和下载限速输入框输入非法值,提示信息是英文
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第七轮测试】终端进行过非正常定时更新,下一次下发非强制更新,控制中心还会显示:系统将于XXX进行更新
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第七轮测试】客户端接收到关机重启更新任务,下载完成后,控制中心应该显示文案:系统将在计算机关机或重启时进行更新
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第一轮测试】客户端接入成功之后,任务栏插件区域公网更新插件未屏蔽
【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第六轮测试】服务端下发忙闲时客户端限速,客户端下载过程中跨两个不同限速区间,任务栏托盘图标没有提示“”“下载限速配置切换中,切换完成后将会继续下载更新资源

Log:如上所述
Bug:https://pms.uniontech.com/bug-view-358767.html
https://pms.uniontech.com/bug-view-358703.html
https://pms.uniontech.com/bug-view-358841.html
https://pms.uniontech.com/bug-view-358833.html
https://pms.uniontech.com/bug-view-354239.html
https://pms.uniontech.com/bug-view-358183.html
Influence:影响私有化更新&更新传递&http限速在线配置功能
@ut005973 ut005973 force-pushed the merge-to-upstream-master branch 5 times, most recently from c93efb0 to a760b17 Compare April 28, 2026 05:26
@xionglinlin
Copy link
Copy Markdown
Contributor

Code review

Found 1 issue:

  1. Memory leak in UpdateAssistant destructor - d_ptr is allocated with new in the constructor but never deleted. The destructor is empty, causing a memory leak every time an UpdateAssistant object is destroyed.

, d_ptr(new UpdateAssistantPrivate)
{
QDBusConnection::systemBus().connect("org.deepin.upgradedelivery", "/org/deepin/upgradedelivery", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(onPropertyChanged(QString, QVariantMap, QStringList)));
}
UpdateAssistant::~UpdateAssistant()
{
}

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@ut005973 ut005973 force-pushed the merge-to-upstream-master branch from a760b17 to 86f6b0f Compare April 28, 2026 12:08
…ine Configuration – Feature Merged into Mainline

Includes the following three features:

I. Private Update

The private update feature is controlled by the intranet-update configuration option under lastore-daemon. When disabled, the public network update module interface in the Control Center is displayed. When enabled, the interface switches to the private update interface.

Differences between the private update interface and the public network interface:
a. The update settings entry is hidden. Enterprise-level update users are not allowed to modify update-related configurations.
b. The process from checking for updates to downloading in private update mode is atomic. Enterprise update users cannot refuse to download, and the download process cannot be canceled.
c. After the download is complete, a re-check button is added.
d. For non-mandatory update tasks, after the download is complete, users can choose the update method themselves: update immediately or update after shutdown.
e. A dedicated private update tray is added to provide more detailed download/update status. The tray is loaded only when the private update switch is enabled.
Story: https://pms.uniontech.com/story-view-40191.html

II. Update Delivery

A master switch for update delivery is added to the Advanced Settings page of the Control Center for updates. When the switch is turned on, the interface displays two sub-items: "Update Delivery – Upload Rate Limit" and "Update Delivery – Download Rate Limit". Each sub-item has its own control switch and speed limit input box, and calls the corresponding interfaces in lastore-daemon.

The switches and input boxes for the upload and download rate limit sub-items control the enabling/disabling and specific values of the upload and download rate limits respectively, by calling SetDeliveryUploadSpeedLimit and SetDeliveryDownloadSpeedLimit in lastore-daemon.

The rate limit configuration for update delivery supports policies issued by the update platform backend for peak/off-peak hours. When such policies are active, the Control Center grays out the upload and download rate limit sub-items accordingly, preventing users from making modifications.

Each time the master switch is operated, the status values of the various sub-items are refreshed accordingly by reading the corresponding attributes from the upgrade-delivery service.
Task: https://pms.uniontech.com/task-view-387713.html

III. HTTP Download Rate Limit Online Configuration
The HTTP download rate limit feature supports online configuration. Once the online configuration takes effect, the interface controls are grayed out and disabled for user operations.
Story: https://pms.uniontech.com/story-view-40191.html

feat: 私有化更新&更新传递&http下载限速在线配置 功能合入主线

包含以下三部分功能
一.私有化更新
1.通过lastore-daemon下面的intranet-update配置项决定功能私有化功能是否开启,未开启时仍为控制中心公网更新模块界面,开启后切换为私有化更新界面 2.私有化更新界面与公网界面大致相同,主要有以下区别点:
a.屏蔽更新设置入口,企业级更新的用户不允许私自修改更新相关配置
b.私有化更新的检查更新到下载流程为原子化操作,企业及更新用户无拒绝下载的权利,下载过程中不允许取消 c.下载完成后添加重复检查按钮
d.若为非强制更新类型的任务,下载完成后允许用户自行决定更新方式,立即更新or关机后更新
e.添加私有化专属托盘,提供更详细的下载更新状态,仅在私有化开关开启时加载托盘
Story: https://pms.uniontech.com/story-view-40191.html

二.更新传递
1.添加更新传递总开关在控制中心更新高级设置界面。当开关打开时,界面展示更新传递-上传限速、更新传递-下载限速两个子项,每个子项有各自的控制开关和限速值输入框,同时调用lastore-daemon的SetP2pEnable相关接口,在lastore的下次检查更新时尝试拉起upgrade-delivery系统服务
2.更新传递-上传限速、更新传递-下载限速两个子项的开关和输入框各自控制上传、下载限速的开启和关闭以及具体数值,具体通过调用lastore-daemon的SetDeliveryUploadSpeedLimit和SetDeliveryDownloadSpeedLimit接口交由lastore来实际设置值。
3.更新传递的限速配置支持通过更新平台后端下发忙闲时的限速策略,此时控制中心会根据这一策略适时置灰更新传递-上传限速、更新传递-下载限速两个子项,禁止用户修改
4.每次操作总开关时会适时的刷新各种子项的状态值,具体是从upgrade-delivery服务中读取对应的属性值
Task: https://pms.uniontech.com/task-view-387713.html

三.http下载限速在线配置
http下载限速功能支持在线配置,在线配置生效后界面置灰,禁止用户操作
Story: https://pms.uniontech.com/story-view-40191.html
@ut005973 ut005973 force-pushed the merge-to-upstream-master branch from 86f6b0f to 27c185c Compare April 28, 2026 12:23
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

代码审查报告

总体评价

这次代码变更主要涉及系统更新功能的增强,包括:

  1. 新增私有化更新支持(private-lastore-tray)
  2. 更新传递优化功能(Delivery Optimization)
  3. 更新UI和交互逻辑的改进
  4. 多语言支持更新

整体代码结构清晰,功能划分合理,但存在一些可以改进的地方。

详细审查

1. 语法和逻辑问题

1.1 updateassistant.cpp 中的内存管理

UpdateAssistant::~UpdateAssistant()
{
    delete d_ptr;
    d_ptr = nullptr;  // 这行是多余的,因为对象即将被销毁
}

建议:删除 d_ptr = nullptr; 这行代码,因为对象即将被销毁,置空没有意义。

1.2 updateassistant.cpp 中的逻辑问题

void UpdateAssistant::onPendingCallFinished(QDBusPendingCallWatcher *w)
{
    if (!w)
        return;
    w->deleteLater();
    const auto callName = d_ptr->m_processingCalls.key(w);
    Q_ASSERT(!callName.isEmpty());
    if (callName.isEmpty())
        return;
    // ...
}

问题:使用 Q_ASSERT 后紧接着检查 callName.isEmpty() 是矛盾的,因为 Q_ASSERT 在发布版本中会被移除。
建议:将 Q_ASSERT 替换为普通的条件检查:

if (callName.isEmpty()) {
    qWarning() << "Failed to find call name for watcher";
    return;
}

1.3 updatemodel.cpp 中的逻辑问题

void UpdateModel::setSpeedLimitConfig(const QByteArray& config, bool isFromQml)
{
    qCDebug(logDccUpdatePlugin) << "Set speed limit config:" << config;
    if (DownloadSpeedLimitConfig::fromJson(m_speedLimitConfig).isOnlineSpeedLimit && isFromQml)
        return;
    if (m_speedLimitConfig == config)
        return;

    m_speedLimitConfig = config;
    Q_EMIT downloadSpeedLimitConfigChanged();
}

问题:当 isFromQml 为 true 且当前是在线限速时,直接返回而不更新配置,这可能导致配置不一致。
建议:添加日志说明为什么跳过更新,或者考虑是否真的需要跳过。

2. 代码质量改进

2.1 魔法数字

static constexpr int ShutdownUpdateStatus = 5;

建议:使用枚举或常量定义,并添加注释说明每个状态值的含义:

enum UpdateStatus {
    Default = 0,
    UpdatesAvailable = 1,
    Downloading = 2,
    DownloadPaused = 3,
    Downloaded = 4,
    ShutdownUpdate = 5,
    // ...
};

2.2 函数命名

inline QString transferDeliveryConfigToLastoreDeliveryConfig(const QString& deliveryConfig)

问题:函数名过长,且 transferto 语义重复。
建议:简化为 convertDeliveryConfigtransformDeliveryConfig

2.3 代码重复

UpdateSetting.qml 中,下载和上传限速的设置逻辑高度重复:

D.LineEdit {
    id: downloadLineEdit
    // ... 大量重复代码
}

D.LineEdit {
    id: uploadLineEdit
    // ... 类似的重复代码
}

建议:提取为可重用组件:

component SpeedLimitLineEdit: D.LineEdit {
    // 公共属性和方法
}

3. 性能优化

3.1 频繁的 JSON 解析

bool UpdateModel::downloadSpeedLimitEnabled() const
{
    return DownloadSpeedLimitConfig::fromJson(m_speedLimitConfig).downloadSpeedLimitEnabled;
}

问题:每次调用都解析 JSON,效率较低。
建议:缓存解析结果,只在配置变化时重新解析。

3.2 不必要的信号连接

connect(m_updateAssistant, &UpdateAssistant::UploadLimitSpeedChanged, this, &UpdateModel::onUpdatePropertiesChanged);
connect(m_updateAssistant, &UpdateAssistant::DownloadLimitSpeedChanged, this, &UpdateModel::onUpdatePropertiesChanged);

建议:考虑使用信号映射或单一信号带参数的方式,减少连接数量。

4. 安全问题

4.1 输入验证

void UpdateWorker::setDownloadSpeedLimitSize(const QString& size)
{
    qCDebug(logDccUpdatePlugin) << "set download speed limit size" << size;
    auto config = m_model->speedLimitConfig();
    config.limitSpeed = size;
    setDownloadSpeedLimitConfig(config.toJson());
}

问题:没有验证输入 size 的有效性。
建议:添加输入验证:

bool ok;
int speed = size.toInt(&ok);
if (!ok || speed < 10 || speed > 999999) {
    qWarning() << "Invalid speed limit value:" << size;
    return;
}

4.2 D-Bus 调用错误处理

QDBusPendingReply<void> UpdateDBusProxy::SetUpgradeDeliveryEnable(bool enable)
{
    qCDebug(logCommon) << "Setting upgrade delivery enable :" << enable;
    QList<QVariant> argumentList;
    argumentList << QVariant::fromValue(enable);
    return m_updateInter->asyncCallWithArgumentList(QStringLiteral("SetP2PUpdateEnable"), argumentList);
}

问题:没有处理可能的 D-Bus 错误。
建议:添加错误处理回调或使用同步调用检查结果。

4.3 配置文件权限

m_dconfig(DConfig::create("org.deepin.dde.lastore", "org.deepin.dde.lastore", "", this))

建议:添加配置文件权限检查,确保只有授权用户可以修改。

5. 其他建议

5.1 资源管理

m_animLabel1->setPixmap(QPixmap(":resources/private-lastore-sleep_16px.svg"));
m_animLabel2->setPixmap(QPixmap(":resources/private-lastore-active_16px.svg"));

建议:考虑使用 SVG 渲染器直接渲染,而不是转换为位图,以获得更好的缩放效果。

5.2 线程安全

QMap<QString, QDBusPendingCallWatcher *> m_processingCalls;
QMap<QString, QList<QVariant>> m_waittingCalls;

问题:这些映射可能在多线程环境下使用,但没有同步保护。
建议:添加互斥锁保护这些共享数据结构。

5.3 国际化

text: qsTr("Delivery Optimization")

建议:为所有用户可见的文本添加翻译,并确保翻译键名一致。

总结

这次代码变更实现了重要的功能增强,但在以下几个方面需要改进:

  1. 加强输入验证和错误处理
  2. 优化性能,特别是频繁的 JSON 解析
  3. 提高代码可维护性,减少重复
  4. 增强线程安全性
  5. 完善文档和注释

建议在合并前进行充分的测试,特别是边界条件和错误场景。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ut005973, xionglinlin

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ut005973 ut005973 merged commit fa504dc into linuxdeepin:master Apr 28, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants