Skip to content

Revert "fix(a11y): fix Accessible.id crash and compile warning" - #1787

Open
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/revert-accessible-id-workaround
Open

MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/revert-accessible-id-workaround

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This reverts commit 72b624a, except for the m_ActiveId int -> uint change, which is kept to avoid the sign-compare error under -Werror.

The Accessible.id workaround is no longer needed: the Qt fix removing REVISION(6, 8) from Accessible.id has already landed in the integration environment, so the static Accessible.id bindings work again. https://github.com/deepin-community/qt6-declarative/pull/37/changes#diff-93467241211d3f9d253fb8ad341738fbda5e5d3ade4721326f2bba82525fbaee

Summary by Sourcery

Restore static accessibility ID assignments throughout the dock and notification interfaces while preserving the compiler-warning fix.

Bug Fixes:

  • Restore declarative Accessible.id bindings across dock and notification QML components now that the underlying Qt issue is resolved.

Enhancements:

  • Retain the unsigned active-ID type adjustment while reverting the workaround that assigned accessibility IDs during component initialization.

Chores:

  • Revert the related accessibility workaround changes and update the affected copyright year.

This reverts commit 72b624a, except for
the m_ActiveId int -> uint change, which is kept to avoid the sign-compare
error under -Werror.

The Accessible.id workaround is no longer needed: the Qt fix removing
REVISION(6, 8) from Accessible.id has already landed in the integration
environment, so the static Accessible.id bindings work again.
https://github.com/deepin-community/qt6-declarative/pull/37/changes#diff-93467241211d3f9d253fb8ad341738fbda5e5d3ade4721326f2bba82525fbaee
@MyLeeJiEun
MyLeeJiEun requested a review from mhduiy October 28, 2026 10:43
@sourcery-ai

sourcery-ai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR reverts the Accessible.id crash workaround across dock and notification QML by moving IDs back from Component.onCompleted assignments to declarative bindings, relying on the integrated Qt fix for static Accessible.id support; it also preserves the unsigned m_ActiveId warning fix and restores the prior header copyright year.

File-Level Changes

Change Details Files
Restore declarative accessibility ID bindings now that the upstream Qt workaround is no longer required.
  • Replace Component.onCompleted assignments with Accessible.id property bindings across dock, tray, quick-panel, and notification QML components.
  • Preserve accessibility IDs for dynamically created delegates and popup/content layers while keeping their existing roles and behavior.
  • Add declarative IDs for WindowIndicator, AppItem, StashedPopup, and TrayContainer, which were previously assigned imperatively.
  • Remove the retained assignment statements from completion handlers and retain the m_ActiveId unsigned-type fix outside the shown QML changes.
  • Revert the header copyright year change.
panels/dock/OverflowContainer.qml
panels/dock/appruntimeitem/package/appruntimeitem.qml
panels/dock/appruntimeitem/windowmanager.h
panels/dock/multitaskview/package/multitaskview.qml
panels/dock/package/main.qml
panels/dock/showdesktop/package/showdesktop.qml
panels/dock/taskmanager/package/AppItem.qml
panels/dock/taskmanager/package/TaskManager.qml
panels/dock/tray/SurfacePopup.qml
panels/dock/tray/SurfaceSubPopup.qml
panels/dock/tray/TrayItemSurfacePopup.qml
panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml
panels/dock/tray/package/ActionShowStashDelegate.qml
panels/dock/tray/package/ActionToggleCollapseDelegate.qml
panels/dock/tray/package/DummyDelegate.qml
panels/dock/tray/package/StashContainer.qml
panels/dock/tray/package/StashedItemDelegateChooser.qml
panels/dock/tray/package/TrayItemDelegateChooser.qml
panels/dock/tray/package/tray.qml
panels/dock/tray/quickpanel/DragItem.qml
panels/dock/tray/quickpanel/PanelPluginPage.qml
panels/dock/tray/quickpanel/PanelTrayItem.qml
panels/dock/tray/quickpanel/PluginItem.qml
panels/dock/tray/quickpanel/QuickPanel.qml
panels/dock/tray/quickpanel/QuickPanelPage.qml
panels/dock/tray/quickpanel/SubPluginPage.qml
panels/notification/bubble/package/Bubble.qml
panels/notification/bubble/package/main.qml
panels/notification/center/GroupNotify.qml
panels/notification/center/NormalNotify.qml
panels/notification/center/NotifyCenter.qml
panels/notification/center/NotifyHeader.qml
panels/notification/center/NotifyHeaderTitleText.qml
panels/notification/center/NotifySetting.qml
panels/notification/center/NotifyStaging.qml
panels/notification/center/NotifyView.qml
panels/notification/center/NotifyViewDelegate.qml
panels/notification/center/OverlapNotify.qml
panels/notification/center/package/main.qml
panels/notification/osd/displaymode/package/main.qml
panels/notification/osd/kblayout/package/main.qml
panels/notification/osd/windoweffect/package/main.qml
panels/notification/plugin/NotifyAction.qml
panels/notification/plugin/NotifyItemContent.qml

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 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

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

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交是对 Accessible.id 赋值方式的回退操作,将之前从声明式属性绑定改为 Component.onCompleted 命令式赋值的 workaround 还原为声明式写法。变更涉及 30 个 QML 文件,修改模式一致且机械。语法正确、逻辑清晰,无安全漏洞,性能无负面影响, 代码质量良好。OCR 审查同样未发现任何问题。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: ['建议将 windowmanager.h 版权年份的修改与 Accessible.id 回退逻辑分开提交,以提高提交的内聚性']


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例

当前代码已是正确的声明式写法,无需修复。示例:
// 推荐的声明式写法(本次回退后的结果) ListView {
    Accessible.id: "ListView"
    id: listView
    anchors.fill: parent
}
// 而非之前的命令式 workaround // ListView { //     Component.onCompleted: { Accessible.id = "ListView" } //     id: listView //     anchors.fill: parent // }

本报告由 AI 代码审查工具自动生成

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.

2 participants