Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crash in Treeland #60

Merged
merged 1 commit into from
Jan 8, 2025
Merged

fix: crash in Treeland #60

merged 1 commit into from
Jan 8, 2025

Conversation

mhduiy
Copy link
Contributor

@mhduiy mhduiy commented Jan 7, 2025

Used outdated protocol XML files,Now we rely on package and use the protocol files provided by it

pms: BUG-294459

Used outdated protocol XML files,Now we rely on package <treeland-protocols> and use the protocol files provided by it

pms: BUG-294459
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 依赖项管理

    • debian/control文件中添加了treeland-protocols作为依赖项,但未提供该依赖项的版本号。建议明确指定版本号以确保兼容性。
  2. 协议文件删除

    • protocol/treeland-personalization-manager-v1.xml文件被删除,但未在代码中看到相应的移除或替换逻辑。需要确认是否有其他代码依赖于该文件,并确保删除不会影响现有功能。
  3. CMakeLists.txt文件修改

    • src/CMakeLists.txtsrc/wayland/CMakeLists.txt中,将协议文件路径从相对路径改为${TREELAND_PROTOCOLS_DATA_DIR}。需要确保TreelandProtocols包正确安装,并且${TREELAND_PROTOCOLS_DATA_DIR}环境变量正确设置。
  4. 类名和接口名修改

    • src/personalization_manager_client.cppsrc/personalization_manager_client.hsrc/wallpaper.cpp等文件中,将personalization_wallpaper_context_v1personalization_window_context_v1接口名修改为treeland_personalization_wallpaper_context_v1treeland_personalization_window_context_v1。需要确认这些修改是否与协议文件中的接口定义一致,并且所有相关的调用和引用都已更新。
  5. 信号和事件名称修改

    • src/personalization_manager_client.h中,将personalization_wallpaper_context_v1_metadata信号和treeland_personalization_wallpaper_context_v1_metadata函数的名称进行了修改。需要确保这些修改不会影响现有的信号连接和事件处理逻辑。
  6. 代码注释

    • src/personalization_manager_client.cppsrc/personalization_manager_client.h中,set_background_type函数的注释有误,应该描述函数的作用,而不是重复描述。
  7. 代码风格

    • src/wallpaper.cpp中,setOn2Int函数的代码风格不一致,建议统一使用一致的代码风格。
  8. 潜在的错误处理

    • src/wallpaper.cppsetOn2Int函数中,没有对options参数进行空值检查,可能会导致空指针异常。建议添加相应的空值检查逻辑。
  9. 协议文件删除

    • src/wayland/protocols/treeland-capture-unstable-v1.xml文件被删除,需要确认是否有其他代码依赖于该文件,并确保删除不会影响现有功能。
  10. 依赖项管理

    • src/wayland/CMakeLists.txt中添加了TreelandProtocols作为依赖项,但未在debian/control文件中添加。建议在debian/control文件中也添加该依赖项。

总体来说,这些修改涉及到协议文件路径的更改、类名和接口名的修改,以及一些代码风格和错误处理的改进。需要确保这些修改不会引入新的问题,并且与现有的代码库兼容。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602, mhduiy

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

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 8b86964 into linuxdeepin:master Jan 8, 2025
16 of 17 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