Skip to content

Conversation

@wjyrich
Copy link
Contributor

@wjyrich wjyrich commented Jun 5, 2025

as title.

Log:

Summary by Sourcery

Unify on a single D-Bus interface by removing the redundant "locked" property from both interface XML files and updating the proxy definition to match.

Bug Fixes:

  • Fix mismatched Q_PROPERTY name for the "Locked" property.

Enhancements:

  • Remove the "locked" property from the new org.deepin.ds.dock D-Bus interface XML.
  • Remove the "locked" property from the legacy org.deepin.dde.dock1 D-Bus interface XML.
  • Rename DockDBusProxy's Q_PROPERTY to "Locked" to align with the unified interface.

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 文件删除属性

    • org.deepin.ds.dock.xmlorg.deepin.dde.dock1.xml文件中,locked属性被删除了。需要确认这是否是有意为之,以及是否有其他代码依赖于这个属性。如果有,需要重新添加或进行相应的修改。
  2. 属性命名一致性

    • dockdbusproxy.h文件中,locked属性的读取和写入函数保持不变,但属性名从Locked改为了locked。建议保持属性名和函数名的一致性,以避免混淆。如果属性名是Locked,那么函数名也应该相应地改为Locked
  3. 代码风格

    • dockdbusproxy.h文件中,Q_PROPERTY宏的属性名Locked和函数名locked不一致,建议统一使用Lockedlocked,以保持代码风格的一致性。
  4. 注释和文档

    • 如果删除了locked属性,应该在相关文件中添加注释说明为什么删除了这个属性,以及是否有替代方案或影响的其他部分。
  5. 代码维护

    • 如果locked属性被删除,需要检查是否有其他代码依赖于这个属性,并确保这些代码已经更新以适应这一变化。

总结:

  • 确认locked属性删除的原因,并确保没有其他代码依赖于这个属性。
  • 保持属性名和函数名的命名一致性,以避免混淆。
  • 添加必要的注释和文档,以便其他开发者理解代码的变更。
  • 检查并更新所有依赖locked属性的代码。

@sourcery-ai
Copy link

sourcery-ai bot commented Jun 5, 2025

Reviewer's Guide

This PR consolidates the D-Bus interface by removing redundant “locked” property declarations from XML definitions and updating the DockDBusProxy class to use a single, capitalized “Locked” property.

ER Diagram: Removal of 'locked' Property from D-Bus Interfaces

erDiagram
    "org.deepin.ds.dock (D-Bus Interface)" {
        boolean locked "Property removed"
    }
    "org.deepin.dde.dock1 (D-Bus Interface)" {
        boolean locked "Property removed"
    }
Loading

Class Diagram: DockDBusProxy 'Locked' Property Update

classDiagram
  class DockDBusProxy {
    +WindowSizeFashion : uint
    +DisplayMode : int
    +ShowInPrimary : bool
    +Locked : bool
    +locked() : bool
    +setLocked(bool) : void
  }
Loading

File-Level Changes

Change Details Files
Capitalized the Q_PROPERTY for the locked flag in the proxy header
  • Changed Q_PROPERTY name from “locked” to “Locked”
  • Retained READ and WRITE accessors unmodified
panels/dock/dockdbusproxy.h
Removed redundant “locked” property from both new and old D-Bus XML interfaces
  • Deleted entries in new DS dock interface
  • Deleted entries in old dde dock1 interface
panels/dock/api/dbus/org.deepin.ds.dock.xml
panels/dock/api/old/org.deepin.dde.dock1.xml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@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.

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

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@BLumia BLumia merged commit 32279ca into linuxdeepin:master Jun 5, 2025
7 of 10 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