Skip to content

fix: 可配置显示服务与支持 - #639

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:fix-369185-remove-deepin-from-desktop-i18n
Jul 27, 2026
Merged

fix: 可配置显示服务与支持#639
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:fix-369185-remove-deepin-from-desktop-i18n

Conversation

@add-uos

@add-uos add-uos commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

可配置显示服务与支持

pick from: 1101250

Task: https://pms.uniontech.com/task-view-374189.html
Log: 可配置显示服务与支持

Summary by Sourcery

Make the display of the service and support entry configurable via DConfig for specific UOS editions.

Enhancements:

  • Read a DConfig setting to control whether the service and support entry is considered available on supported UOS editions.

Build:

  • Integrate a DConfig metadata JSON file into the build and installation process for org.deepin.manual.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

可配置显示服务与支持

pick from: 1101250

Task: https://pms.uniontech.com/task-view-374189.html
Log: 可配置显示服务与支持
@add-uos
add-uos force-pushed the fix-369185-remove-deepin-from-desktop-i18n branch from 080b9db to 3687302 Compare July 27, 2026 03:06
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码通过DConfig实现了服务与支持的显示控制,逻辑严谨且内存管理规范。
逻辑正确,内存安全,无安全漏洞,代码质量良好,给予满分。

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

具体分析内容:在 Utils::hasSelperSupport 函数中,使用 QScopedPointer<DConfig> 管理 DConfig::create 返回的指针,避免了内存泄漏。通过 #ifdef DTKCORE_CLASS_DConfigFile 进行条件编译,保证了向后兼容性。bSelperSupport 默认初始化为 true,在 DConfig 不可用时回退到原有逻辑,保证了程序的健壮性。
潜在问题:无
建议:无

  • 2.代码质量(良好)✓

具体分析内容:代码结构清晰,遵循了 DTK 框架的 DConfig 使用规范。CMakeLists.txt 中的配置逻辑完整,区分了 DSG_DATA_DIR 存在与否的情况。
潜在问题:org.deepin.manual.customui.json 文件末尾缺少换行符(\ No newline at end of file),这在某些版本控制系统或工具中可能会引发警告。
建议:在 JSON 文件末尾添加一个空行。

  • 3.代码性能(无性能问题)✓

具体分析内容:hasSelperSupport 函数中每次调用都会创建 DConfig 对象并读取配置。考虑到该函数主要用于判断系统版本和手册列表,通常不会被高频调用,因此当前的性能开销在可接受范围内。
潜在问题:无
建议:如果未来该函数被高频调用,可考虑将 DConfig 对象缓存为类成员变量。

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
总体风险描述:代码不存在安全漏洞。DConfig 配置项的 visibility 设置为 privatepermissions 设置为 readwrite,限制了外部应用对该配置的随意篡改。QScopedPointer 保证了内存安全,无注入或溢出风险。

  • 建议:无

■ 【改进建议代码示例】

diff --git a/manual-assets/org.deepin.manual.customui.json b/manual-assets/org.deepin.manual.customui.json
index 5f61f136d..e69de29bb 100755
--- a/manual-assets/org.deepin.manual.customui.json
+++ b/manual-assets/org.deepin.manual.customui.json
@@ -13,4 +13,4 @@
             "visibility": "private"
         }
     }
-}
\ No newline at end of file
+}

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos, lzwind

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

@add-uos

add-uos commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit 9d9759e into linuxdeepin:master Jul 27, 2026
14 of 16 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.

4 participants