Skip to content

feat: Adapt to V23 dde dbus interface#286

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:develop/snipefrom
wangrong1069:pr0613
Jun 13, 2025
Merged

feat: Adapt to V23 dde dbus interface#286
deepin-bot[bot] merged 1 commit intolinuxdeepin:develop/snipefrom
wangrong1069:pr0613

Conversation

@wangrong1069
Copy link
Copy Markdown
Contributor

@wangrong1069 wangrong1069 commented Jun 13, 2025

As title.

Log: Adapt to V23 dde dbus interface

Summary by Sourcery

Adapt window activation to support the new DDE Dock DBus interface v23 while retaining compatibility with the existing v20 interface

Enhancements:

  • Introduce detection and use of the org.deepin.dde.daemon.Dock1 interface for v23 with fallback to com.deepin.dde.daemon.Dock for v20
  • Consolidate activation logic into a single code path and enhance error logging to include the service name

As title.

Log: Adapt to V23 dde dbus interface
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jun 13, 2025

Reviewer's Guide

This change adapts the window activation logic to the V23 DDE Dock DBus interface while retaining compatibility with V20, consolidating the call path and improving error logging.

Sequence Diagram for DBus Interface Compatibility

sequenceDiagram
    participant AA as ApplicationAdaptor
    participant DBusV23 as DDE DBus V23<br>org.deepin.dde.daemon.Dock1
    participant DBusV20 as DDE DBus V20<br>com.deepin.dde.daemon.Dock

    AA->>AA: onActiveWindow(pid)
    alt V23 interface is valid
        AA->>DBusV23: call("ActivateWindow", winId)
        DBusV23-->>AA: reply
    else V23 is invalid, try V20
        AA->>DBusV20: call("ActivateWindow", winId)
        DBusV20-->>AA: reply
    end
Loading

File-Level Changes

Change Details Files
Added support for V23 Dock DBus interface with fallback to V20
  • Defined a new QDBusInterface instance for the V23 service, path, and interface names
  • Selected between the V23 and existing V20 interface based on validity
src/source/common/dbusadpator.cpp
Refactored ActivateWindow call to use unified interface pointer
  • Replaced separate v20 call block with a single dockDbusInterface pointer invocation
  • Consolidated call to ActivateWindow on the chosen interface
src/source/common/dbusadpator.cpp
Enhanced error reporting for DBus calls
  • Updated warning log to include the service name when a call fails
  • Streamlined success log message
src/source/common/dbusadpator.cpp

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

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

关键摘要:

  • 代码中使用了条件运算符来选择DBus接口,但未处理dockDbusInterfaceV23dockDbusInterfaceV20都无效的情况。
  • 错误信息中包含了DBus接口的服务名,有助于调试,但应确保错误信息格式一致。

是否建议立即修改:

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wangrong1069

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

@wangrong1069
Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 853536e into linuxdeepin:develop/snipe Jun 13, 2025
14 checks passed
@wangrong1069 wangrong1069 deleted the pr0613 branch June 13, 2025 08:00
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