Skip to content

Conversation

@mhduiy
Copy link
Contributor

@mhduiy mhduiy commented May 20, 2025

  1. Added support for fetching icons from ApplicationManager DBus interface
  2. Special handling for Linglong containerized apps where executable path isn't accessible
  3. Added fallback to default icon when theme icon not available
  4. Implemented DBus communication to get app icons from desktop entry
  5. Added necessary header includes and DBus constants

The changes were necessary because:

  1. Linglong apps run in containers making their executable paths inaccessible
  2. Previous implementation couldn't properly display icons for containerized apps
  3. New solution uses ApplicationManager DBus interface as reliable icon source
  4. Maintains backward compatibility with regular applications

feat: 改进玲珑应用的图标处理

  1. 添加从ApplicationManager DBus接口获取图标支持
  2. 对玲珑容器化应用特殊处理,其可执行路径无法访问
  3. 添加主题图标不可用时的默认图标回退机制
  4. 实现通过DBus从桌面条目获取应用图标
  5. 添加必要的头文件包含和DBus常量

修改原因:

  1. 玲珑应用运行在容器中导致其可执行路径无法访问
  2. 原实现无法正确显示容器化应用的图标
  3. 新方案使用ApplicationManager DBus接口作为可靠图标来源
  4. 保持对常规应用的向后兼容性

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request May 20, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#9
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request May 20, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#9
@mhduiy mhduiy changed the title feat: improve icon handling for Linglong apps feat: improve the logic of obtaining icons May 20, 2025
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request May 20, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#9
1. Added support for fetching icons from ApplicationManager DBus
interface
2. Special handling for Linglong containerized apps where executable
path isn't accessible
3. Added fallback to default icon when theme icon not available
4. Implemented DBus communication to get app icons from desktop entry
5. Added necessary header includes and DBus constants

The changes were necessary because:
1. Linglong apps run in containers making their executable paths
inaccessible
2. Previous implementation couldn't properly display icons for
containerized apps
3. New solution uses ApplicationManager DBus interface as reliable icon
source
4. Maintains backward compatibility with regular applications

feat: 改进玲珑应用的图标处理

1. 添加从ApplicationManager DBus接口获取图标支持
2. 对玲珑容器化应用特殊处理,其可执行路径无法访问
3. 添加主题图标不可用时的默认图标回退机制
4. 实现通过DBus从桌面条目获取应用图标
5. 添加必要的头文件包含和DBus常量

修改原因:
1. 玲珑应用运行在容器中导致其可执行路径无法访问
2. 原实现无法正确显示容器化应用的图标
3. 新方案使用ApplicationManager DBus接口作为可靠图标来源
4. 保持对常规应用的向后兼容性

pms: BUG-315995
pms: BUG-281765
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • #ifdef ENABLE_DSS_SNIPE#endif块中重复包含了相同的头文件,应该合并到一起。
  • do { ... } while(0);的使用可能不是必要的,可以考虑使用if语句。
  • qCWarning日志应该包含更多的上下文信息,比如函数名和行号。
  • QDBusSender的使用没有错误处理,应该添加错误处理逻辑。
  • QDBusReply<QDBusVariant>isValid()检查后没有进行相应的处理,应该根据返回值进行不同的操作。
  • QMap<QString, QString>value()方法可能抛出异常,应该使用value()的重载版本,并检查键是否存在。
  • QDBusVariantvariant()方法返回的是const引用,应该使用const_cast来修改返回的值。
  • QString::arg的使用可能会导致安全问题,如果inhibitor.pid包含特殊字符,应该进行适当的转义。
  • QIcon::fromTheme在找不到图标时返回默认图标,这可能会导致用户体验不一致。

是否建议立即修改:

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request May 20, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#9
@mhduiy mhduiy requested a review from yixinshark May 20, 2025 12:23
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy, yixinshark

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

@mhduiy mhduiy merged commit 9032be0 into linuxdeepin:master May 21, 2025
14 of 15 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