Skip to content

fix(a11y): fix Accessible.id crash and compile warning - #1751

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:task-395933
Sep 22, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:task-395933

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor
  1. Replace static Accessible.id bindings with Component.onCompleted assignments across dock, tray and notification panels, since Qt 6.8's revision-gated property fails at load time and crashes applet creation.
  2. Merge the new onCompleted handlers into existing ones where an object already defined Component.onCompleted, avoiding duplicate-handler errors.
  3. Change WindowManager::m_ActiveId from int to uint to silence the signed/unsigned comparison warning.

Log: Replace Accessible.id bindings with Component.onCompleted to fix the Qt 6.8 load-time crash, and fix a WindowManager compile warning.
Influence: Fixes dde-shell startup crash and a compile warning.

fix(a11y): 修复 Accessible.id 崩溃和编译警告

  1. 将 dock、tray、notification 各面板中静态的 Accessible.id 绑定改为 Component.onCompleted 命令式赋值,规避 Qt 6.8 下版本门控属性加载失败导致的崩溃。
  2. 对已存在 Component.onCompleted 的对象进行合并,避免同一对象出现重复处理器错误。
  3. 将 WindowManager::m_ActiveId 由 int 改为 uint,消除有符号/无符号比较编译警告。

Log: 用 Component.onCompleted 替代 Accessible.id 绑定以修复 Qt 6.8 加载期崩溃,并修复 WindowManager 编译警告。
PMS: TASK-395933
Influence: 修复 dde-shell 启动崩溃和编译警告。

Summary by Sourcery

Prevent accessibility-related startup crashes and resolve the WindowManager compilation warning.

Bug Fixes:

  • Prevent Qt 6.8 load-time crashes during dock, tray, and notification component creation by deferring accessibility ID assignment until component completion.

Enhancements:

  • Preserve accessibility identifiers when merging assignments into existing completion handlers and remove duplicate static bindings where necessary.
  • Change the active window identifier to an unsigned type to eliminate signed/unsigned comparison warnings.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @MyLeeJiEun, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 hours and 58 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR works around a Qt 6.8 QML startup crash by moving Accessible.id initialization from load-time bindings to Component.onCompleted handlers throughout dock and notification UI components, while preserving existing completion logic and changing WindowManager::m_ActiveId to uint to remove a compile warning.

Sequence diagram for deferred accessibility initialization

sequenceDiagram
    participant QML as QML component loader
    participant Component as UI component
    participant Accessible as Accessible attached property

    QML->>Component: Create component
    Component->>Accessible: Component.onCompleted
    Component->>Accessible: Assign Accessible.id
    Accessible-->>Component: Accessibility identifier available
Loading

File-Level Changes

Change Details Files
Defer accessibility ID initialization until component completion to avoid Qt 6.8 revision-gated property failures during QML loading.
  • Replace static Accessible.id bindings with imperative Component.onCompleted assignments across dock, tray/quick-panel, notification center, notification bubbles, OSDs, and notification plugin components.
  • Merge assignments into existing Component.onCompleted handlers for dynamically created delegates and popup/container objects.
  • Remove the original bindings where existing completion handlers now initialize the IDs.
panels/dock/**/*.qml
panels/notification/**/*.qml
Align the active window identifier type with unsigned comparisons.
  • Change WindowManager::m_ActiveId from int to uint.
  • Update the copyright year range in the header.
panels/dock/appruntimeitem/windowmanager.h

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

Hi @MyLeeJiEun. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Comment thread panels/dock/tray/package/tray.qml Outdated
1. Replace static Accessible.id bindings with Component.onCompleted assignments across dock, tray and notification panels, since Qt 6.8's revision-gated property fails at load time and crashes applet creation.
2. Merge the new onCompleted handlers into existing ones where an object already defined Component.onCompleted, avoiding duplicate-handler errors.
3. Change WindowManager::m_ActiveId from int to uint to silence the signed/unsigned comparison warning.

Log: Replace Accessible.id bindings with Component.onCompleted to fix the Qt 6.8 load-time crash, and fix a WindowManager compile warning.
Influence: Fixes dde-shell startup crash and a compile warning.

fix(a11y): 修复 Accessible.id 崩溃和编译警告

1. 将 dock、tray、notification 各面板中静态的 Accessible.id 绑定改为 Component.onCompleted 命令式赋值,规避 Qt 6.8 下版本门控属性加载失败导致的崩溃。
2. 对已存在 Component.onCompleted 的对象进行合并,避免同一对象出现重复处理器错误。
3. 将 WindowManager::m_ActiveId 由 int 改为 uint,消除有符号/无符号比较编译警告。

Log: 用 Component.onCompleted 替代 Accessible.id 绑定以修复 Qt 6.8 加载期崩溃,并修复 WindowManager 编译警告。
PMS: TASK-395933
Influence: 修复 dde-shell 启动崩溃和编译警告。
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 72b624a into linuxdeepin:master Sep 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants