Skip to content

fix: add qq.weixin work to dock window icon whitelist#1602

Merged
18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master
May 19, 2026
Merged

fix: add qq.weixin work to dock window icon whitelist#1602
18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Copy Markdown
Contributor

@18202781743 18202781743 commented May 19, 2026

Add "com.qq.weixin.work.deepin" to the windowIconWhitelist configuration
in the taskmanager dconfig, ensuring that QChat (WeChat Work) windows
display their own icons in the dock instead of falling back to default
or generic icons. This change extends the existing whitelist for Tencent
applications, which already includes "com.tencent.wechat", to provide
a consistent icon experience for both personal WeChat and QChat Work on
the dock.

Log: Added qq.weixin Work to dock window icon whitelist

Influence:

  1. Verify QChat Work windows show custom icons in the dock
  2. Check that personal WeChat icon display remains unaffected
  3. Test dock behavior with both applications open simultaneously
  4. Ensure icon display is consistent across different workspace states

fix: 将企业微信加入Dock窗口图标白名单

在任务管理器的dconfig配置中,将"com.qq.weixin.work.deepin"加入
windowIconWhitelist,确保企业微信窗口在Dock上显示其专属图标,而
非回退至默认或通用图标。此更改扩展了已有的腾讯应用白名单(已包
含"com.tencent.wechat"),为个人微信和企业微信在Dock上提供一致的图标
体验。

Log: 新增企业微信到Dock窗口图标白名单

Influence:

  1. 验证企业微信窗口在Dock上显示自定义图标
  2. 检查个人微信图标显示不受影响
  3. 测试两个应用同时打开时Dock的行为
  4. 确保图标在不同工作区状态下显示一致

PMS: TASK-389031

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Add "com.qq.weixin.work.deepin" to the windowIconWhitelist configuration
in the taskmanager dconfig, ensuring that QChat (WeChat Work) windows
display their own icons in the dock instead of falling back to default
or generic icons. This change extends the existing whitelist for Tencent
applications, which already includes "com.tencent.wechat", to provide
a consistent icon experience for both personal WeChat and QChat Work on
the dock.

Log: Added qq.weixin Work to dock window icon whitelist

Influence:
1. Verify QChat Work windows show custom icons in the dock
2. Check that personal WeChat icon display remains unaffected
3. Test dock behavior with both applications open simultaneously
4. Ensure icon display is consistent across different workspace states

fix: 将企业微信加入Dock窗口图标白名单

在任务管理器的dconfig配置中,将"com.qq.weixin.work.deepin"加入
windowIconWhitelist,确保企业微信窗口在Dock上显示其专属图标,而
非回退至默认或通用图标。此更改扩展了已有的腾讯应用白名单(已包
含"com.tencent.wechat"),为个人微信和企业微信在Dock上提供一致的图标
体验。

Log: 新增企业微信到Dock窗口图标白名单

Influence:
1. 验证企业微信窗口在Dock上显示自定义图标
2. 检查个人微信图标显示不受影响
3. 测试两个应用同时打开时Dock的行为
4. 确保图标在不同工作区状态下显示一致

PMS: TASK-389031
@18202781743 18202781743 changed the title fix: add QChat work to dock window icon whitelist fix: add qq.weixin work to dock window icon whitelist May 19, 2026
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

你好!我是CodeGeex,很高兴为你进行代码审查。

本次审查的代码变更是一个JSON格式的DConfig配置文件,主要作用是向 windowIconWhitelist(窗口图标白名单)中新增了一个应用 com.qq.weixin.work.deepin(企业微信Deepin版)。

以下是我的详细审查意见:

1. 语法逻辑

  • 状态:通过
  • 分析:JSON数组的语法修改正确,在原有字符串后添加了逗号,并正确追加了新的字符串元素,没有破坏JSON结构。从逻辑上看,该配置项的意图是将特定的应用加入白名单,新增企业微信的逻辑是合理的。

2. 代码质量

  • 状态:建议优化
  • 分析
    • 可读性与维护性:目前白名单中的值是硬编码的包名。虽然对于DConfig这种配置文件来说硬编码是常态,但随着白名单的不断扩大,维护起来可能会变得困难。
    • 命名规范windowIconWhitelist 这个命名本身没有问题,但在当前的开源社区和国际化背景下,建议考虑使用更加包容性的词汇,例如 windowIconAllowlist(虽然这需要修改代码中的解析逻辑,仅作为长远重构建议,本次审查不强制要求修改)。

3. 代码性能

  • 状态:通过
  • 分析:该变更为静态配置文件的修改,对运行时性能的影响微乎其微。程序在加载该配置时,多解析一个短字符串的内存和时间开销可以忽略不计。如果代码中对该白名单的查询是高频操作,建议在代码审查时确认业务代码是否使用了 QSet 或哈希表等 O(1) 复杂度的数据结构进行查询,而不是 QList 的线性查找。

4. 代码安全

  • 状态:需确认风险
  • 分析
    • 供应链/包名信任问题:将应用加入“窗口图标白名单”通常意味着允许该应用使用自定义图标,或者绕过某些默认的图标替换策略。请确认 com.qq.weixin.work.deepin 这个包名确实是官方或可信来源的企业微信版本,防止恶意软件通过伪装包名来获取白名单特权。
    • 配置文件权限:由于这是私有配置("visibility": "private"),需确保该配置文件在系统中的权限设置合理,防止低权限用户随意修改白名单注入恶意应用。

总结与改进建议

本次变更非常简单且直接,语法和逻辑均无错误。主要的考量点在于安全层面的包名信任以及长远的代码维护

改进建议(可选):
如果未来白名单持续增长,建议在对应的C++/QML业务代码中增加日志,当白名单中的应用被匹配到时输出 debug 级别的日志,以便于后期排查图标显示异常的问题。

审查结论:可以合并,但请确认新增的包名是受信任的。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

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

@18202781743 18202781743 merged commit f39942e into linuxdeepin:master May 19, 2026
11 of 12 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