feat: add configurable system version text on login/lock screen - #86
Conversation
1. Add new dconfig key "systemVersionText" to lock and greeter configuration files 2. Set default value to empty string, displaying system default version info when empty 3. When configured, custom text replaces default version info on login/ lock screens 4. Implement dynamic config binding and property change handling 5. Add unit tests covering custom text display, fallback behavior, and dconfig change callbacks 6. Update copyright years 7. Escape `$` and backticks in the commit message using backslashes Log: When systemVersionText is set, the custom text will display instead of the default version number and type. Set as empty to restore. Influence: 1. Verify the login screen displays the correct system version info by default 2. Configure systemVersionText in dconfig and verify the custom text appears 3. Clear systemVersionText and verify the default version info is displayed again 4. Test on the lock screen to ensure the same behavior applies 5. Verify the setting persists across login/logout and lock/unlock cycles feat: 支持自定义登录/锁屏界面系统版本信息 1. 在锁屏和登录界面配置文件中添加新的 dconfig 键 "systemVersionText" 2. 设置默认值为空字符串,为空时显示系统默认版本信息 3. 配置了自定义文本时,替换默认版本信息显示在登录/锁屏界面上 4. 实现动态配置绑定和属性变更处理 5. 添加单元测试覆盖自定义文本显示、回退行为和 dconfig 变更回调 6. 更新版权年份 Log: 当设置了 systemVersionText 时,将显示自定义文本并替代默认的版本号和 系统类型。设置空值即可恢复默认显示。 Influence: 1. 验证登录界面默认显示正确的系统版本信息 2. 在 dconfig 中配置 systemVersionText,验证自定义文本正确出现 3. 清空 systemVersionText,验证默认版本信息恢复显示 4. 在锁屏界面进行相同测试,确保行为一致 5. 验证设置在登录/注销及锁屏/解锁周期中保持生效 PMS: TASK-395357 Change-Id: I2664dc814ef98bf9f31cc0f450c57ab7e1508fe5
Reviewer's GuideAdds systemVersionText to greeter and lock configurations, uses it to replace the default version label when non-empty, and dynamically restores or updates the display as dconfig changes; unit tests cover the main display and callback paths. Sequence diagram for dynamic system version text updatessequenceDiagram
participant DConfig as DConfigHelper
participant LogoWidget
participant Label as VersionLabel
LogoWidget->>DConfig: getConfig(SYSTEM_VERSION_TEXT, "")
DConfig-->>LogoWidget: systemVersionText
LogoWidget->>LogoWidget: updateVersionText(customText)
alt customText is empty
LogoWidget->>LogoWidget: getVersion()
LogoWidget->>Label: setText(default version)
else customText is configured
LogoWidget->>Label: setText(customText)
end
DConfig->>LogoWidget: onDConfigPropertyChanged(SYSTEM_VERSION_TEXT, value, objPtr)
LogoWidget->>LogoWidget: updateVersionText(value)
LogoWidget->>Label: setText(updated version text)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto reviewAI 代码审查报告
总体评分:98 分(优秀)
总体评价
维度1:语法逻辑 ✓(25/25)
分析内容: 本次提交涉及 8 个文件的修改,核心逻辑如下:
潜在问题:
维度2:代码质量 ✓(23/25)
分析内容:
潜在问题:
改进建议代码示例: /**
* @brief 更新版本文本显示
* @param customText 自定义版本文本,为空时显示系统默认版本号
*/
void LogoWidget::updateVersionText(const QString &customText)
{
m_logoVersionLabel->setText(customText.isEmpty() ? getVersion() : customText);
}维度3:代码性能 ✓(20/20)
分析内容:
潜在问题:
维度4:代码安全 ✓(30/30)
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 分析内容:
安全漏洞详情: 审查结论本次提交为 新增功能 类型,目的是实现通过 dconfig 配置自定义登录/锁屏界面系统版本信息。代码实现与 commit message 描述的功能完全一致:
代码质量良好,建议补充 本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: xionglinlin, yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#86
$and backticks in the commit message using backslashesLog: When systemVersionText is set, the custom text will display instead of the default version number and type. Set as empty to restore.
Influence:
feat: 支持自定义登录/锁屏界面系统版本信息
Log: 当设置了 systemVersionText 时,将显示自定义文本并替代默认的版本号和
系统类型。设置空值即可恢复默认显示。
Influence:
PMS: TASK-395357
Change-Id: I2664dc814ef98bf9f31cc0f450c57ab7e1508fe5
Summary by Sourcery
Add configurable system version text for login and lock screens while preserving the default version display when unset.
New Features:
Enhancements:
Tests:
Chores: