From 8d97efc15d32c6e9a362702bba2be59a156da534 Mon Sep 17 00:00:00 2001 From: zhaofangxun Date: Tue, 22 Sep 2026 11:49:52 +0800 Subject: [PATCH] fix(a11y): fix Accessible.id crash and compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 启动崩溃和编译警告。 --- panels/dock/OverflowContainer.qml | 2 +- .../appruntimeitem/package/appruntimeitem.qml | 4 ++-- panels/dock/appruntimeitem/windowmanager.h | 4 ++-- .../multitaskview/package/multitaskview.qml | 2 +- panels/dock/package/main.qml | 6 ++--- .../dock/showdesktop/package/showdesktop.qml | 2 +- panels/dock/taskmanager/package/AppItem.qml | 10 ++++----- .../dock/taskmanager/package/TaskManager.qml | 4 ++-- panels/dock/tray/SurfacePopup.qml | 10 ++++----- panels/dock/tray/SurfaceSubPopup.qml | 4 ++-- panels/dock/tray/TrayItemSurfacePopup.qml | 14 ++++++------ .../ActionLegacyTrayPluginDelegate.qml | 4 ++-- .../tray/package/ActionShowStashDelegate.qml | 2 +- .../package/ActionToggleCollapseDelegate.qml | 2 +- panels/dock/tray/package/DummyDelegate.qml | 2 +- panels/dock/tray/package/StashContainer.qml | 2 +- .../package/StashedItemDelegateChooser.qml | 16 +++++++------- .../tray/package/TrayItemDelegateChooser.qml | 22 +++++++++---------- panels/dock/tray/package/tray.qml | 6 ++--- panels/dock/tray/quickpanel/DragItem.qml | 2 +- .../dock/tray/quickpanel/PanelPluginPage.qml | 2 +- panels/dock/tray/quickpanel/PanelTrayItem.qml | 4 ++-- panels/dock/tray/quickpanel/PluginItem.qml | 4 ++-- panels/dock/tray/quickpanel/QuickPanel.qml | 10 ++++----- .../dock/tray/quickpanel/QuickPanelPage.qml | 4 ++-- panels/dock/tray/quickpanel/SubPluginPage.qml | 2 +- panels/notification/bubble/package/Bubble.qml | 2 +- panels/notification/bubble/package/main.qml | 4 ++-- panels/notification/center/GroupNotify.qml | 10 ++++----- panels/notification/center/NormalNotify.qml | 4 ++-- panels/notification/center/NotifyCenter.qml | 6 ++--- panels/notification/center/NotifyHeader.qml | 10 ++++----- .../center/NotifyHeaderTitleText.qml | 2 +- panels/notification/center/NotifySetting.qml | 4 ++-- panels/notification/center/NotifyStaging.qml | 4 ++-- panels/notification/center/NotifyView.qml | 4 ++-- .../center/NotifyViewDelegate.qml | 8 +++---- panels/notification/center/OverlapNotify.qml | 6 ++--- panels/notification/center/package/main.qml | 4 ++-- .../osd/displaymode/package/main.qml | 4 ++-- .../osd/kblayout/package/main.qml | 4 ++-- .../osd/windoweffect/package/main.qml | 4 ++-- panels/notification/plugin/NotifyAction.qml | 2 +- .../notification/plugin/NotifyItemContent.qml | 6 ++--- 44 files changed, 117 insertions(+), 117 deletions(-) diff --git a/panels/dock/OverflowContainer.qml b/panels/dock/OverflowContainer.qml index eb3604fcd..cfc936f29 100644 --- a/panels/dock/OverflowContainer.qml +++ b/panels/dock/OverflowContainer.qml @@ -20,7 +20,7 @@ Item { property alias removeDisplaced: listView.removeDisplaced property alias moveDisplaced: listView.moveDisplaced ListView { - Accessible.id: "ListView" + Component.onCompleted: { Accessible.id = "ListView" } id: listView anchors.fill: parent orientation: useColumnLayout ? ListView.Vertical : ListView.Horizontal diff --git a/panels/dock/appruntimeitem/package/appruntimeitem.qml b/panels/dock/appruntimeitem/package/appruntimeitem.qml index 68fdcab4e..b6a2e442f 100644 --- a/panels/dock/appruntimeitem/package/appruntimeitem.qml +++ b/panels/dock/appruntimeitem/package/appruntimeitem.qml @@ -21,7 +21,7 @@ AppletItem { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "Appruntime" + Component.onCompleted: { Accessible.id = "Appruntime" } id: toolTip text: qsTr("appruntime") toolTipX: DockPanelPositioner.x @@ -29,7 +29,7 @@ AppletItem { } AppletItemButton { Accessible.role: Accessible.Button - Accessible.id: "Button" + Component.onCompleted: { Accessible.id = "Button" } id: button anchors.centerIn: parent icon.name: "qrc:/ddeshell/package/icons/appruntime.svg" diff --git a/panels/dock/appruntimeitem/windowmanager.h b/panels/dock/appruntimeitem/windowmanager.h index 8151d56a1..01f4ec413 100644 --- a/panels/dock/appruntimeitem/windowmanager.h +++ b/panels/dock/appruntimeitem/windowmanager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -49,7 +49,7 @@ class WindowManager : public QAbstractListModel { private: QList m_WindowList; int m_InactiveId; - int m_ActiveId; + uint m_ActiveId; }; #endif // WINDOWMANAGER_H diff --git a/panels/dock/multitaskview/package/multitaskview.qml b/panels/dock/multitaskview/package/multitaskview.qml index 6b369943d..2e2b524c2 100644 --- a/panels/dock/multitaskview/package/multitaskview.qml +++ b/panels/dock/multitaskview/package/multitaskview.qml @@ -18,7 +18,7 @@ AppletDockItem { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "MultitaskingView" + Component.onCompleted: { Accessible.id = "MultitaskingView" } id: toolTip text: qsTr("Multitasking View") toolTipX: DockPanelPositioner.x diff --git a/panels/dock/package/main.qml b/panels/dock/package/main.qml index 6d126d80e..95afad169 100644 --- a/panels/dock/package/main.qml +++ b/panels/dock/package/main.qml @@ -622,7 +622,7 @@ Window { Accessible.name: qsTr("Dock Left Area") OverflowContainer { Accessible.role: Accessible.Pane - Accessible.id: "LeftLoader" + Component.onCompleted: { Accessible.id = "LeftLoader" } id: leftLoader anchors.fill: parent useColumnLayout: dock.useColumnLayout @@ -672,7 +672,7 @@ Window { OverflowContainer { Accessible.role: Accessible.Pane - Accessible.id: "CenterLoader" + Component.onCompleted: { Accessible.id = "CenterLoader" } id: centerLoader anchors.fill: parent useColumnLayout: dock.useColumnLayout @@ -702,7 +702,7 @@ Window { anchors.bottom: parent.bottom OverflowContainer { Accessible.role: Accessible.Pane - Accessible.id: "RightLoader" + Component.onCompleted: { Accessible.id = "RightLoader" } id: rightLoader anchors.fill: parent useColumnLayout: dock.useColumnLayout diff --git a/panels/dock/showdesktop/package/showdesktop.qml b/panels/dock/showdesktop/package/showdesktop.qml index 8432fac63..dc50d03b2 100644 --- a/panels/dock/showdesktop/package/showdesktop.qml +++ b/panels/dock/showdesktop/package/showdesktop.qml @@ -22,7 +22,7 @@ AppletItem { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "ShowDesktop" + Component.onCompleted: { Accessible.id = "ShowDesktop" } id: toolTip text: qsTr("show desktop") toolTipX: DockPanelPositioner.x diff --git a/panels/dock/taskmanager/package/AppItem.qml b/panels/dock/taskmanager/package/AppItem.qml index 322584206..3ec95614d 100644 --- a/panels/dock/taskmanager/package/AppItem.qml +++ b/panels/dock/taskmanager/package/AppItem.qml @@ -75,7 +75,7 @@ Item { AppItemPalette { Accessible.role: Accessible.Pane - Accessible.id: "ItemPalette" + Component.onCompleted: { Accessible.id = "ItemPalette" } id: itemPalette displayMode: root.displayMode colorTheme: root.colorTheme @@ -246,7 +246,6 @@ Item { WindowIndicator { Accessible.role: Accessible.Indicator - Accessible.id: "WindowIndicator" id: windowIndicator dotWidth: root.useColumnLayout ? Math.max(iconSize / 16, 2) : Math.max(iconSize / 3, 2) dotHeight: root.useColumnLayout ? Math.max(iconSize / 3, 2) : Math.max(iconSize / 16, 2) @@ -300,12 +299,13 @@ Item { Component.onCompleted: { windowIndicator.updateIndicatorAnchors() + Accessible.id = "WindowIndicator" } } AppItemTitle { Accessible.role: Accessible.StaticText - Accessible.id: "TitleLoader" + Component.onCompleted: { Accessible.id = "TitleLoader" } id: titleLoader anchors.left: iconContainer.right anchors.leftMargin: Math.round(root.iconSize / 8) @@ -562,7 +562,7 @@ Item { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "ToolTip" + Component.onCompleted: { Accessible.id = "ToolTip" } id: toolTip toolTipX: DockPanelPositioner.x toolTipY: DockPanelPositioner.y @@ -570,7 +570,7 @@ Item { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "MoveToTrash" + Component.onCompleted: { Accessible.id = "MoveToTrash" } id: dragToolTip text: qsTr("Move to Trash") toolTipX: DockPanelPositioner.x diff --git a/panels/dock/taskmanager/package/TaskManager.qml b/panels/dock/taskmanager/package/TaskManager.qml index 1550bf87e..cea2cd6df 100644 --- a/panels/dock/taskmanager/package/TaskManager.qml +++ b/panels/dock/taskmanager/package/TaskManager.qml @@ -119,7 +119,7 @@ ContainmentItem { OverflowContainer { Accessible.role: Accessible.Pane - Accessible.id: "AppContainer" + Component.onCompleted: { Accessible.id = "AppContainer" } id: appContainer anchors.fill: parent anchors.leftMargin: useColumnLayout ? 0 : taskmanager.startPadding @@ -226,7 +226,6 @@ ContainmentItem { AppItem { Accessible.role: Accessible.ListItem - Accessible.id: "AppItem" id: appItem anchors.fill: parent // This is mandatory for draggable item center in drop area @@ -247,6 +246,7 @@ ContainmentItem { ListView.delayRemove: Drag.active Component.onCompleted: { dropFilesOnItem.connect(taskmanager.Applet.dropFilesOnItem) + Accessible.id = "AppItem" } onDragFinished: function() { launcherDndDropArea.resetDndState() diff --git a/panels/dock/tray/SurfacePopup.qml b/panels/dock/tray/SurfacePopup.qml index 809c6eb3c..393859bb8 100644 --- a/panels/dock/tray/SurfacePopup.qml +++ b/panels/dock/tray/SurfacePopup.qml @@ -19,7 +19,7 @@ Item { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "ToolTip" + Component.onCompleted: { Accessible.id = "ToolTip" } id: toolTip onToolTipVisibleChanged: function (visible) { if (visible && menuWindow.visible) @@ -29,7 +29,7 @@ Item { property alias shellSurface: surfaceLayer.shellSurface ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "SurfaceLayer" + Component.onCompleted: { Accessible.id = "SurfaceLayer" } id: surfaceLayer anchors.centerIn: parent autoClose: true @@ -53,7 +53,7 @@ Item { } PanelMenu { Accessible.role: Accessible.PopupMenu - Accessible.id: "Menu" + Component.onCompleted: { Accessible.id = "Menu" } id: menu width: menuSurfaceLayer.width height: menuSurfaceLayer.height @@ -62,7 +62,7 @@ Item { property alias shellSurface: menuSurfaceLayer.shellSurface ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "MenuSurfaceLayer" + Component.onCompleted: { Accessible.id = "MenuSurfaceLayer" } id: menuSurfaceLayer anchors.centerIn: parent autoClose: true @@ -85,7 +85,7 @@ Item { active: false sourceComponent: SurfaceSubPopup { Accessible.role: Accessible.Dialog - Accessible.id: "SurfaceSubPopup" + Component.onCompleted: { Accessible.id = "SurfaceSubPopup" } objectName: "stashed's subPopup" transientParent: menuWindow surfaceAcceptor: function (surfaceId) { diff --git a/panels/dock/tray/SurfaceSubPopup.qml b/panels/dock/tray/SurfaceSubPopup.qml index 06931ba2e..c69e1aecd 100644 --- a/panels/dock/tray/SurfaceSubPopup.qml +++ b/panels/dock/tray/SurfaceSubPopup.qml @@ -48,7 +48,7 @@ Item { PanelMenu { Accessible.role: Accessible.PopupMenu - Accessible.id: "Popup" + Component.onCompleted: { Accessible.id = "Popup" } id: popup width: popupSurfaceLayer.width height: popupSurfaceLayer.height @@ -57,7 +57,7 @@ Item { property alias shellSurface: popupSurfaceLayer.shellSurface ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "PopupSurfaceLayer" + Component.onCompleted: { Accessible.id = "PopupSurfaceLayer" } id: popupSurfaceLayer anchors.centerIn: parent autoClose: true diff --git a/panels/dock/tray/TrayItemSurfacePopup.qml b/panels/dock/tray/TrayItemSurfacePopup.qml index 6baf609f2..4ef8a52f1 100644 --- a/panels/dock/tray/TrayItemSurfacePopup.qml +++ b/panels/dock/tray/TrayItemSurfacePopup.qml @@ -28,7 +28,7 @@ Item { PanelPopup { Accessible.role: Accessible.Dialog - Accessible.id: "Popup" + Component.onCompleted: { Accessible.id = "Popup" } id: popup property alias shellSurface: popupContent.shellSurface width: popupContent.width @@ -42,7 +42,7 @@ Item { anchors.fill: parent ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "PopupContent" + Component.onCompleted: { Accessible.id = "PopupContent" } id: popupContent anchors.centerIn: parent autoClose: true @@ -55,7 +55,7 @@ Item { PanelMenu { Accessible.role: Accessible.PopupMenu - Accessible.id: "PopupMenu" + Component.onCompleted: { Accessible.id = "PopupMenu" } id: popupMenu property alias shellSurface: popupMenuContent.shellSurface width: popupMenuContent.width @@ -76,7 +76,7 @@ Item { anchors.fill: parent ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "PopupMenuContent" + Component.onCompleted: { Accessible.id = "PopupMenuContent" } id: popupMenuContent anchors.centerIn: parent autoClose: true @@ -100,7 +100,7 @@ Item { active: false sourceComponent: SurfaceSubPopup { Accessible.role: Accessible.Dialog - Accessible.id: "SurfaceSubPopup" + Component.onCompleted: { Accessible.id = "SurfaceSubPopup" } objectName: "tray's subPopup" transientParent: popupMenu.menuWindow surfaceAcceptor: function (surfaceId) { @@ -126,7 +126,7 @@ Item { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "ToolTip" + Component.onCompleted: { Accessible.id = "ToolTip" } id: toolTip property alias shellSurface: toolTipContent.shellSurface toolTipX: DockPanelPositioner.x @@ -134,7 +134,7 @@ Item { ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "ToolTipContent" + Component.onCompleted: { Accessible.id = "ToolTipContent" } id: toolTipContent anchors.centerIn: parent autoClose: true diff --git a/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml b/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml index 62e7e6542..e6b787b77 100644 --- a/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml +++ b/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml @@ -16,7 +16,7 @@ import org.deepin.ds.dock.tray 1.0 as DDT AppletItemButton { Accessible.role: Accessible.Button - Accessible.id: "AppletItemButton" + Component.onCompleted: { Accessible.id = "AppletItemButton" } id: root property alias inputEventsEnabled: surfaceItem.inputEventsEnabled @@ -86,7 +86,7 @@ AppletItemButton { ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "SurfaceItem" + Component.onCompleted: { Accessible.id = "SurfaceItem" } id: surfaceItem anchors.fill: parent shellSurface: pluginItem.plugin diff --git a/panels/dock/tray/package/ActionShowStashDelegate.qml b/panels/dock/tray/package/ActionShowStashDelegate.qml index f49d3f4f6..cb8088fd6 100644 --- a/panels/dock/tray/package/ActionShowStashDelegate.qml +++ b/panels/dock/tray/package/ActionShowStashDelegate.qml @@ -116,7 +116,7 @@ AppletItemButton { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "ApplicationTray" + Component.onCompleted: { Accessible.id = "ApplicationTray" } id: toolTip text: qsTr("Application tray") toolTipX: DockPanelPositioner.x diff --git a/panels/dock/tray/package/ActionToggleCollapseDelegate.qml b/panels/dock/tray/package/ActionToggleCollapseDelegate.qml index 40fef456e..1fbd87b70 100644 --- a/panels/dock/tray/package/ActionToggleCollapseDelegate.qml +++ b/panels/dock/tray/package/ActionToggleCollapseDelegate.qml @@ -54,7 +54,7 @@ AppletItemButton { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "CollapseTray" + Component.onCompleted: { Accessible.id = "CollapseTray" } id: toolTip text: qsTr("Collapse tray") toolTipX: DockPanelPositioner.x diff --git a/panels/dock/tray/package/DummyDelegate.qml b/panels/dock/tray/package/DummyDelegate.qml index b2fd7993c..a0f78175f 100644 --- a/panels/dock/tray/package/DummyDelegate.qml +++ b/panels/dock/tray/package/DummyDelegate.qml @@ -8,7 +8,7 @@ import org.deepin.ds.dock 1.0 import org.deepin.ds.dock.tray 1.0 as DDT Button { - Accessible.id: "Button" + Component.onCompleted: { Accessible.id = "Button" } icon.name: model.surfaceId icon.width: 16 icon.height: 16 diff --git a/panels/dock/tray/package/StashContainer.qml b/panels/dock/tray/package/StashContainer.qml index ed64b467f..476dd707a 100644 --- a/panels/dock/tray/package/StashContainer.qml +++ b/panels/dock/tray/package/StashContainer.qml @@ -72,7 +72,7 @@ Item { // tooltip and menu DDT.SurfacePopup { Accessible.role: Accessible.Dialog - Accessible.id: "StashSurfacePopup" + Component.onCompleted: { Accessible.id = "StashSurfacePopup" } id: stashSurfacePopup objectName: "stash" surfaceAcceptor: isStashPopup diff --git a/panels/dock/tray/package/StashedItemDelegateChooser.qml b/panels/dock/tray/package/StashedItemDelegateChooser.qml index 4c2ad50d8..fc9e99406 100644 --- a/panels/dock/tray/package/StashedItemDelegateChooser.qml +++ b/panels/dock/tray/package/StashedItemDelegateChooser.qml @@ -25,10 +25,10 @@ LQM.DelegateChooser { roleValue: "dummy" StashedItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "StashedItemPositioner" + Component.onCompleted: { Accessible.id = "StashedItemPositioner" } contentItem: DummyDelegate { Accessible.role: Accessible.Button - Accessible.id: "DummyDelegate" + Component.onCompleted: { Accessible.id = "DummyDelegate" } } } } @@ -36,11 +36,11 @@ LQM.DelegateChooser { roleValue: "legacy-tray-plugin" StashedItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "StashItemPositioner" + Component.onCompleted: { Accessible.id = "StashItemPositioner" } id: stashItemPositioner contentItem: ActionLegacyTrayPluginDelegate { Accessible.role: Accessible.Button - Accessible.id: "TrayDelegate" + Component.onCompleted: { Accessible.id = "TrayDelegate" } id: trayDelegate objectName: "stash" itemVisible: stashItemPositioner.itemVisible @@ -114,10 +114,10 @@ LQM.DelegateChooser { roleValue: "action-show-stash" StashedItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "StashedItemPositioner" + Component.onCompleted: { Accessible.id = "StashedItemPositioner" } contentItem: ActionShowStashDelegate { Accessible.role: Accessible.Button - Accessible.id: "ActionShowStashDelegate" + Component.onCompleted: { Accessible.id = "ActionShowStashDelegate" } } } } @@ -125,10 +125,10 @@ LQM.DelegateChooser { roleValue: "action-toggle-collapse" StashedItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "StashedItemPositioner" + Component.onCompleted: { Accessible.id = "StashedItemPositioner" } contentItem: ActionToggleCollapseDelegate { Accessible.role: Accessible.Button - Accessible.id: "ActionToggleCollapseDelegate" + Component.onCompleted: { Accessible.id = "ActionToggleCollapseDelegate" } isHorizontal: root.isHorizontal } } diff --git a/panels/dock/tray/package/TrayItemDelegateChooser.qml b/panels/dock/tray/package/TrayItemDelegateChooser.qml index 3237e6dc3..b446d1ee9 100644 --- a/panels/dock/tray/package/TrayItemDelegateChooser.qml +++ b/panels/dock/tray/package/TrayItemDelegateChooser.qml @@ -23,11 +23,11 @@ LQM.DelegateChooser { roleValue: "dummy" TrayItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "TrayItemPositioner" + Component.onCompleted: { Accessible.id = "TrayItemPositioner" } visualSize: dummyDelegate.visualSize contentItem: DummyDelegate { Accessible.role: Accessible.Button - Accessible.id: "DummyDelegate" + Component.onCompleted: { Accessible.id = "DummyDelegate" } id: dummyDelegate } } @@ -36,12 +36,12 @@ LQM.DelegateChooser { roleValue: "legacy-tray-plugin" TrayItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "TraySurfacePositioner" + Component.onCompleted: { Accessible.id = "TraySurfacePositioner" } id: traySurfacePositioner visualSize: traySurfaceDelegate.visualSize contentItem: ActionLegacyTrayPluginDelegate { Accessible.role: Accessible.Button - Accessible.id: "TraySurfaceDelegate" + Component.onCompleted: { Accessible.id = "TraySurfaceDelegate" } id: traySurfaceDelegate objectName: "tray" inputEventsEnabled: !disableInputEvents && (model.sectionType !== "collapsable" || !DDT.TraySortOrderModel.isCollapsing) @@ -52,7 +52,7 @@ LQM.DelegateChooser { // trayItem's popup DDT.TrayItemSurfacePopup { Accessible.role: Accessible.Dialog - Accessible.id: "SurfacePopup" + Component.onCompleted: { Accessible.id = "SurfacePopup" } id: surfacePopup surfaceAcceptor: function (surfaceId) { if (root.surfaceAcceptor && !root.surfaceAcceptor(surfaceId)) @@ -68,10 +68,10 @@ LQM.DelegateChooser { roleValue: "action-show-stash" TrayItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "TrayItemPositioner" + Component.onCompleted: { Accessible.id = "TrayItemPositioner" } contentItem: ActionShowStashDelegate { Accessible.role: Accessible.Button - Accessible.id: "ActionShowStashDelegate" + Component.onCompleted: { Accessible.id = "ActionShowStashDelegate" } } } } @@ -79,10 +79,10 @@ LQM.DelegateChooser { roleValue: "action-toggle-collapse" TrayItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "TrayItemPositioner" + Component.onCompleted: { Accessible.id = "TrayItemPositioner" } contentItem: ActionToggleCollapseDelegate { Accessible.role: Accessible.Button - Accessible.id: "ActionToggleCollapseDelegate" + Component.onCompleted: { Accessible.id = "ActionToggleCollapseDelegate" } isHorizontal: root.isHorizontal inputEventsEnabled: !disableInputEvents } @@ -92,11 +92,11 @@ LQM.DelegateChooser { roleValue: "action-toggle-quick-settings" TrayItemPositioner { Accessible.role: Accessible.Pane - Accessible.id: "TrayItemPositioner" + Component.onCompleted: { Accessible.id = "TrayItemPositioner" } visualSize: Qt.size(quickSettingsDelegate.width, quickSettingsDelegate.height) ActionToggleQuickSettingsDelegate { Accessible.role: Accessible.Button - Accessible.id: "QuickSettingsDelegate" + Component.onCompleted: { Accessible.id = "QuickSettingsDelegate" } id: quickSettingsDelegate isHorizontal: root.isHorizontal } diff --git a/panels/dock/tray/package/tray.qml b/panels/dock/tray/package/tray.qml index cdbea814c..18c35486f 100644 --- a/panels/dock/tray/package/tray.qml +++ b/panels/dock/tray/package/tray.qml @@ -38,7 +38,6 @@ AppletItem { PanelPopup { Accessible.role: Accessible.Dialog - Accessible.id: "StashedPopup" id: stashedPopup width: stashedContainer.width height: stashedContainer.height @@ -60,7 +59,7 @@ AppletItem { padding: 10 contentItem: StashContainer { Accessible.role: Accessible.Pane - Accessible.id: "StashContainer" + Component.onCompleted: { Accessible.id = "StashContainer" } id: stashContainer color: "transparent" model: DDT.SortFilterProxyModel { @@ -91,6 +90,7 @@ AppletItem { DockPanelPositioner.bounding = Qt.binding(function () { return Qt.rect(collapsedBtnCenterPoint.x, collapsedBtnCenterPoint.y, stashedPopup.width, stashedPopup.height) }) + Accessible.id = "StashedPopup" } } Connections { @@ -134,7 +134,6 @@ AppletItem { TrayContainer { Accessible.role: Accessible.Pane - Accessible.id: "TrayContainter" id: trayContainter isHorizontal: !tray.useColumnLayout model: DDT.TraySortOrderModel @@ -144,6 +143,7 @@ AppletItem { color: "transparent" Component.onCompleted: { DDT.TrayItemPositionManager.layoutHealthCheck(1500) + Accessible.id = "TrayContainter" } // 拖拽成功移入 stash 时由 TrayContainer 回调(命中 action-show-stash) onStashDropSucceeded: function() { diff --git a/panels/dock/tray/quickpanel/DragItem.qml b/panels/dock/tray/quickpanel/DragItem.qml index 6f13b5119..79a704a66 100644 --- a/panels/dock/tray/quickpanel/DragItem.qml +++ b/panels/dock/tray/quickpanel/DragItem.qml @@ -123,7 +123,7 @@ Item { anchors.verticalCenterOffset: -root.fallbackIconSize.height / 3 * 2 sourceComponent: ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "ShellSurfaceItemProxy" + Component.onCompleted: { Accessible.id = "ShellSurfaceItemProxy" } shellSurface: root.fallbackDragImage width: root.fallbackIconSize.width height: root.fallbackIconSize.height diff --git a/panels/dock/tray/quickpanel/PanelPluginPage.qml b/panels/dock/tray/quickpanel/PanelPluginPage.qml index 630b1f88e..7fb9cb611 100644 --- a/panels/dock/tray/quickpanel/PanelPluginPage.qml +++ b/panels/dock/tray/quickpanel/PanelPluginPage.qml @@ -76,7 +76,7 @@ Item { delegate: PluginItem { Accessible.role: Accessible.Pane - Accessible.id: "PluginItem" + Component.onCompleted: { Accessible.id = "PluginItem" } id: pluginItem width: { if (model.surfaceLayoutType === 4) diff --git a/panels/dock/tray/quickpanel/PanelTrayItem.qml b/panels/dock/tray/quickpanel/PanelTrayItem.qml index e02050d4a..81d4f6431 100644 --- a/panels/dock/tray/quickpanel/PanelTrayItem.qml +++ b/panels/dock/tray/quickpanel/PanelTrayItem.qml @@ -33,7 +33,7 @@ Control { PanelToolTip { Accessible.role: Accessible.ToolTip - Accessible.id: "QuickActions" + Component.onCompleted: { Accessible.id = "QuickActions" } id: toolTip text: qsTr("Quick actions") toolTipX: DockPanelPositioner.x @@ -95,7 +95,7 @@ Control { ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "SurfaceLayer" + Component.onCompleted: { Accessible.id = "SurfaceLayer" } id: surfaceLayer property var itemGlobalPoint: { var a = surfaceLayer diff --git a/panels/dock/tray/quickpanel/PluginItem.qml b/panels/dock/tray/quickpanel/PluginItem.qml index 93d3a29b8..a12b16926 100644 --- a/panels/dock/tray/quickpanel/PluginItem.qml +++ b/panels/dock/tray/quickpanel/PluginItem.qml @@ -28,7 +28,7 @@ Control { DragItem { Accessible.role: Accessible.Pane - Accessible.id: "DragLayer" + Component.onCompleted: { Accessible.id = "DragLayer" } id: dragLayer anchors.fill: parent dragItem: root @@ -53,7 +53,7 @@ Control { ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "SurfaceLayer" + Component.onCompleted: { Accessible.id = "SurfaceLayer" } id: surfaceLayer anchors.centerIn: parent anchors.fill: parent diff --git a/panels/dock/tray/quickpanel/QuickPanel.qml b/panels/dock/tray/quickpanel/QuickPanel.qml index ea5c00e74..614f73b76 100644 --- a/panels/dock/tray/quickpanel/QuickPanel.qml +++ b/panels/dock/tray/quickpanel/QuickPanel.qml @@ -60,7 +60,7 @@ Item { PanelTrayItem { Accessible.role: Accessible.Button - Accessible.id: "PanelTrayItem" + Component.onCompleted: { Accessible.id = "PanelTrayItem" } id: panelTrayItem shellSurface: quickpanelModel.trayItemSurface isOpened: popup.popupVisible @@ -77,7 +77,7 @@ Item { PanelPopup { Accessible.role: Accessible.Dialog - Accessible.id: "Popup" + Component.onCompleted: { Accessible.id = "Popup" } id: popup width: popupContent.width height: popupContent.height @@ -86,13 +86,13 @@ Item { QuickPanelPage { Accessible.role: Accessible.Pane - Accessible.id: "PopupContent" + Component.onCompleted: { Accessible.id = "PopupContent" } id: popupContent model: quickpanelModel DDT.SurfacePopup { Accessible.role: Accessible.Dialog - Accessible.id: "SurfacePopup" + Component.onCompleted: { Accessible.id = "SurfacePopup" } objectName: "quickpanel" surfaceAcceptor: function (surfaceId) { let pluginId = pluginIdBySurfaceId(surfaceId) @@ -110,7 +110,7 @@ Item { // trayItem's popup DDT.TrayItemSurfacePopup { Accessible.role: Accessible.Dialog - Accessible.id: "TrayItemSurfacePopup" + Component.onCompleted: { Accessible.id = "TrayItemSurfacePopup" } id: trayItemSurfacePopup surfaceAcceptor: isTrayItemPopup surfaceFilter: function (surfaceId) { diff --git a/panels/dock/tray/quickpanel/QuickPanelPage.qml b/panels/dock/tray/quickpanel/QuickPanelPage.qml index 950f4e784..580a59c9f 100644 --- a/panels/dock/tray/quickpanel/QuickPanelPage.qml +++ b/panels/dock/tray/quickpanel/QuickPanelPage.qml @@ -40,7 +40,7 @@ Item { height: panelView.contentHeight initialItem: PanelPluginPage { Accessible.role: Accessible.Pane - Accessible.id: "PanelPage" + Component.onCompleted: { Accessible.id = "PanelPage" } id: panelPage model: root.model StackView.onActivating: function () { @@ -56,7 +56,7 @@ Item { id: subPluginPageLoader SubPluginPage { Accessible.role: Accessible.Pane - Accessible.id: "SubPluginPage" + Component.onCompleted: { Accessible.id = "SubPluginPage" } width: panelPage.width onRequestBack: function () { panelView.pop() diff --git a/panels/dock/tray/quickpanel/SubPluginPage.qml b/panels/dock/tray/quickpanel/SubPluginPage.qml index ca30e1836..f12e4bd05 100644 --- a/panels/dock/tray/quickpanel/SubPluginPage.qml +++ b/panels/dock/tray/quickpanel/SubPluginPage.qml @@ -90,7 +90,7 @@ Item { // content ShellSurfaceItemProxy { Accessible.role: Accessible.Pane - Accessible.id: "SurfaceLayer" + Component.onCompleted: { Accessible.id = "SurfaceLayer" } id: surfaceLayer autoClose: true Layout.fillWidth: true diff --git a/panels/notification/bubble/package/Bubble.qml b/panels/notification/bubble/package/Bubble.qml index 8846cf8be..dbc7f892e 100644 --- a/panels/notification/bubble/package/Bubble.qml +++ b/panels/notification/bubble/package/Bubble.qml @@ -11,7 +11,7 @@ import org.deepin.dtk 1.0 as D NotifyItemContent { Accessible.role: Accessible.Pane - Accessible.id: "Bubble" + Component.onCompleted: { Accessible.id = "Bubble" } id: control property var bubble diff --git a/panels/notification/bubble/package/main.qml b/panels/notification/bubble/package/main.qml index bfaa7837b..29b486ba8 100644 --- a/panels/notification/bubble/package/main.qml +++ b/panels/notification/bubble/package/main.qml @@ -91,7 +91,7 @@ Window { } ListView { - Accessible.id: "BubbleView" + Component.onCompleted: { Accessible.id = "BubbleView" } id: bubbleView // Close button overhang: half of 20px button height minus 2px visual offset // (see NotifyItemContent.qml closePlaceHolder topMargin: -height / 2 + 2) @@ -184,7 +184,7 @@ Window { delegate: BubbleDelegate { Accessible.role: Accessible.ListItem - Accessible.id: "BubbleDelegate" + Component.onCompleted: { Accessible.id = "BubbleDelegate" } maxCount: model.bubbleCount onHeightChanged: { diff --git a/panels/notification/center/GroupNotify.qml b/panels/notification/center/GroupNotify.qml index d9edbe7ef..cfd8c7b9b 100644 --- a/panels/notification/center/GroupNotify.qml +++ b/panels/notification/center/GroupNotify.qml @@ -11,7 +11,7 @@ import org.deepin.ds.notificationcenter NotifyItem { Accessible.role: Accessible.ListItem - Accessible.id: "NotifyItem" + Component.onCompleted: { Accessible.id = "NotifyItem" } id: root implicitWidth: impl.implicitWidth implicitHeight: impl.implicitHeight @@ -60,7 +60,7 @@ NotifyItem { contentItem: RowLayout { NotifyHeaderTitleText { Accessible.role: Accessible.StaticText - Accessible.id: "NotifyHeaderTitleText" + Component.onCompleted: { Accessible.id = "NotifyHeaderTitleText" } text: root.appName Layout.alignment: Qt.AlignLeft Layout.leftMargin: 18 @@ -74,7 +74,7 @@ NotifyItem { AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "Fold" + Component.onCompleted: { Accessible.id = "Fold" } id: foldBtn Layout.alignment: Qt.AlignRight activeFocusOnTab: false @@ -96,7 +96,7 @@ NotifyItem { } AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "More" + Component.onCompleted: { Accessible.id = "More" } id: groupMoreBtn Layout.alignment: Qt.AlignRight activeFocusOnTab: false @@ -119,7 +119,7 @@ NotifyItem { } AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "ClearAll" + Component.onCompleted: { Accessible.id = "ClearAll" } id: groupClearBtn Layout.alignment: Qt.AlignRight activeFocusOnTab: false diff --git a/panels/notification/center/NormalNotify.qml b/panels/notification/center/NormalNotify.qml index a362ee8e6..36f89578b 100644 --- a/panels/notification/center/NormalNotify.qml +++ b/panels/notification/center/NormalNotify.qml @@ -11,7 +11,7 @@ import org.deepin.ds.notificationcenter NotifyItem { Accessible.role: Accessible.ListItem - Accessible.id: "NotifyItem" + Component.onCompleted: { Accessible.id = "NotifyItem" } id: root implicitWidth: impl.implicitWidth implicitHeight: impl.implicitHeight @@ -55,7 +55,7 @@ NotifyItem { contentItem: NotifyItemContent { Accessible.role: Accessible.Pane - Accessible.id: "NotifyContent" + Component.onCompleted: { Accessible.id = "NotifyContent" } id: notifyContent width: parent.width appName: root.appName diff --git a/panels/notification/center/NotifyCenter.qml b/panels/notification/center/NotifyCenter.qml index 59aaf0be8..117401cce 100644 --- a/panels/notification/center/NotifyCenter.qml +++ b/panels/notification/center/NotifyCenter.qml @@ -47,7 +47,7 @@ FocusScope { anchors.fill: parent NotifyHeader { Accessible.role: Accessible.Pane - Accessible.id: "Header" + Component.onCompleted: { Accessible.id = "Header" } id: header anchors { top: parent.top @@ -75,7 +75,7 @@ FocusScope { NotifyView { Accessible.role: Accessible.List - Accessible.id: "View" + Component.onCompleted: { Accessible.id = "View" } id: view anchors { left: parent.left @@ -100,7 +100,7 @@ FocusScope { DropShadowText { Accessible.role: Accessible.StaticText - Accessible.id: "NoRecentNotifications" + Component.onCompleted: { Accessible.id = "NoRecentNotifications" } text: qsTr("No recent notifications") visible: root.stagingViewCount === 0 && view.viewCount === 0 anchors { diff --git a/panels/notification/center/NotifyHeader.qml b/panels/notification/center/NotifyHeader.qml index 2424592f8..bc185edfe 100644 --- a/panels/notification/center/NotifyHeader.qml +++ b/panels/notification/center/NotifyHeader.qml @@ -73,7 +73,7 @@ FocusScope { NotifyHeaderTitleText { Accessible.role: Accessible.StaticText - Accessible.id: "NotificationCenter" + Component.onCompleted: { Accessible.id = "NotificationCenter" } id: titleText text: qsTr("Notification Center") elide: Text.ElideNone @@ -83,7 +83,7 @@ FocusScope { AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "Fold" + Component.onCompleted: { Accessible.id = "Fold" } id: collapseBtn objectName: "collapse" visible: !notifyModel.collapse @@ -108,7 +108,7 @@ FocusScope { AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "More" + Component.onCompleted: { Accessible.id = "More" } id: moreBtn objectName: "more" Layout.alignment: Qt.AlignRight @@ -138,7 +138,7 @@ FocusScope { NotifySettingMenu { id: headerSettingMenu MenuItem { - Accessible.id: "NotificationSetting" + Component.onCompleted: { Accessible.id = "NotificationSetting" } text: qsTr("Notification Setting") onClicked: { console.log("Notification setting") @@ -150,7 +150,7 @@ FocusScope { AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "ClearAll" + Component.onCompleted: { Accessible.id = "ClearAll" } id: clearAllBtn objectName: "closeAllNotify" activeFocusOnTab: false diff --git a/panels/notification/center/NotifyHeaderTitleText.qml b/panels/notification/center/NotifyHeaderTitleText.qml index fad949a58..7fa965ede 100644 --- a/panels/notification/center/NotifyHeaderTitleText.qml +++ b/panels/notification/center/NotifyHeaderTitleText.qml @@ -10,7 +10,7 @@ import org.deepin.ds.notificationcenter DropShadowText { Accessible.role: Accessible.StaticText - Accessible.id: "DropShadowText" + Component.onCompleted: { Accessible.id = "DropShadowText" } property font tFont: DTK.fontManager.t4 color: DTK.themeType === ApplicationHelper.DarkType ? Qt.rgba(255, 255, 255, 0.7) : diff --git a/panels/notification/center/NotifySetting.qml b/panels/notification/center/NotifySetting.qml index 2679564d4..ef72d643c 100644 --- a/panels/notification/center/NotifySetting.qml +++ b/panels/notification/center/NotifySetting.qml @@ -15,7 +15,7 @@ NotifySettingMenu { property string appName MenuItem { - Accessible.id: "Unpin" + Component.onCompleted: { Accessible.id = "Unpin" } text: pinned ? qsTr("Unpin") : qsTr("Pin") onClicked: { let state = !root.pinned @@ -24,7 +24,7 @@ NotifySettingMenu { } } MenuItem { - Accessible.id: "NotificationSetting" + Component.onCompleted: { Accessible.id = "NotificationSetting" } text: qsTr("Notification Setting") onClicked: { console.log("Notify setting") diff --git a/panels/notification/center/NotifyStaging.qml b/panels/notification/center/NotifyStaging.qml index 1d480c601..affa3d673 100644 --- a/panels/notification/center/NotifyStaging.qml +++ b/panels/notification/center/NotifyStaging.qml @@ -80,7 +80,7 @@ FocusScope { } ListView { - Accessible.id: "View" + Component.onCompleted: { Accessible.id = "View" } id: view spacing: 10 snapMode: ListView.SnapToItem @@ -91,7 +91,7 @@ FocusScope { model: notifyModel delegate: OverlapNotify { Accessible.role: Accessible.Pane - Accessible.id: "OverlapNotify" + Component.onCompleted: { Accessible.id = "OverlapNotify" } id: overlapNotify objectName: "overlap-" + model.appName focus: true diff --git a/panels/notification/center/NotifyView.qml b/panels/notification/center/NotifyView.qml index 5cf0a9ab7..5e4751c0b 100644 --- a/panels/notification/center/NotifyView.qml +++ b/panels/notification/center/NotifyView.qml @@ -67,7 +67,7 @@ Control { activeFocusOnTab: false boundsBehavior: Flickable.StopAtBounds ScrollBar.vertical: ScrollBar { - Accessible.id: "Scrollbar" + Component.onCompleted: { Accessible.id = "Scrollbar" } } topMargin: 20 bottomMargin: 10 @@ -252,6 +252,6 @@ Control { background: BoundingRectangle { Accessible.role: Accessible.Pane - Accessible.id: "BoundingRectangle" + Component.onCompleted: { Accessible.id = "BoundingRectangle" } } } diff --git a/panels/notification/center/NotifyViewDelegate.qml b/panels/notification/center/NotifyViewDelegate.qml index 12e038bd4..a74277cdb 100644 --- a/panels/notification/center/NotifyViewDelegate.qml +++ b/panels/notification/center/NotifyViewDelegate.qml @@ -57,7 +57,7 @@ DelegateChooser { roleValue: "group" GroupNotify { Accessible.role: Accessible.ListItem - Accessible.id: "GroupNotify" + Component.onCompleted: { Accessible.id = "GroupNotify" } id: groupNotify objectName: "group-" + model.appName width: NotifyStyle.contentItem.width @@ -94,7 +94,7 @@ DelegateChooser { roleValue: "normal" NormalNotify { Accessible.role: Accessible.ListItem - Accessible.id: "NormalNotify" + Component.onCompleted: { Accessible.id = "NormalNotify" } id: normalNotify objectName: "normal-" + model.appName width: NotifyStyle.contentItem.width @@ -168,7 +168,7 @@ DelegateChooser { roleValue: "overlap" OverlapNotify { Accessible.role: Accessible.Pane - Accessible.id: "OverlapNotify_2" + Component.onCompleted: { Accessible.id = "OverlapNotify_2" } id: overlapNotify objectName: "overlap-" + model.appName width: NotifyStyle.contentItem.width @@ -191,7 +191,7 @@ DelegateChooser { enableDismissed: false notifyContent.clearButton: AnimationSettingButton { Accessible.role: Accessible.Button - Accessible.id: "CleanAll" + Component.onCompleted: { Accessible.id = "CleanAll" } id: clearBtn icon.name: "clean-alone" text: qsTr("Clean All") diff --git a/panels/notification/center/OverlapNotify.qml b/panels/notification/center/OverlapNotify.qml index 5c06edc2f..89e02e4b8 100644 --- a/panels/notification/center/OverlapNotify.qml +++ b/panels/notification/center/OverlapNotify.qml @@ -11,7 +11,7 @@ import org.deepin.ds.notificationcenter NotifyItem { Accessible.role: Accessible.ListItem - Accessible.id: "NotifyItem" + Component.onCompleted: { Accessible.id = "NotifyItem" } id: root implicitWidth: impl.implicitWidth implicitHeight: impl.implicitHeight @@ -103,7 +103,7 @@ NotifyItem { implicitHeight: notifyContent.height + indicator.height NotifyItemContent { Accessible.role: Accessible.Pane - Accessible.id: "NotifyContent" + Component.onCompleted: { Accessible.id = "NotifyContent" } id: notifyContent width: parent.width appName: root.appName @@ -148,7 +148,7 @@ NotifyItem { OverlapIndicator { Accessible.role: Accessible.Indicator - Accessible.id: "Indicator" + Component.onCompleted: { Accessible.id = "Indicator" } id: indicator enableAnimation: (root.ListView.view && root.ListView.view.panelShown) ?? false clipItems: true diff --git a/panels/notification/center/package/main.qml b/panels/notification/center/package/main.qml index 1750cd456..0ee598a90 100644 --- a/panels/notification/center/package/main.qml +++ b/panels/notification/center/package/main.qml @@ -215,7 +215,7 @@ Window { NotifyStaging { Accessible.role: Accessible.Pane - Accessible.id: "NotifyStaging" + Component.onCompleted: { Accessible.id = "NotifyStaging" } id: notifyStaging anchors { top: parent.top @@ -243,7 +243,7 @@ Window { NotifyCenter { Accessible.role: Accessible.Pane - Accessible.id: "NotifyCenter" + Component.onCompleted: { Accessible.id = "NotifyCenter" } id: notifyCenter anchors { top: notifyStaging.bottom diff --git a/panels/notification/osd/displaymode/package/main.qml b/panels/notification/osd/displaymode/package/main.qml index df1d933f9..86ca1b26a 100644 --- a/panels/notification/osd/displaymode/package/main.qml +++ b/panels/notification/osd/displaymode/package/main.qml @@ -41,7 +41,7 @@ AppletItem { } ListView { - Accessible.id: "View" + Component.onCompleted: { Accessible.id = "View" } id: view width: 350 height: contentHeight @@ -54,7 +54,7 @@ AppletItem { spacing: 10 delegate: D.ItemDelegate { - Accessible.id: "ItemView" + Component.onCompleted: { Accessible.id = "ItemView" } id: itemView height: 60 width: view.width diff --git a/panels/notification/osd/kblayout/package/main.qml b/panels/notification/osd/kblayout/package/main.qml index faf210549..47fe1c284 100644 --- a/panels/notification/osd/kblayout/package/main.qml +++ b/panels/notification/osd/kblayout/package/main.qml @@ -33,7 +33,7 @@ AppletItem { } ListView { - Accessible.id: "View" + Component.onCompleted: { Accessible.id = "View" } id: view anchors { margins: 10 @@ -55,7 +55,6 @@ AppletItem { implicitWidth: maxItemWidth() delegate: D.ItemDelegate { - Accessible.id: "ItemView" id: itemView width: view.width height: 48 @@ -147,6 +146,7 @@ AppletItem { Qt.callLater(function () { view.implicitWidth = view.maxItemWidth() }) + Accessible.id = "ItemView" } } } diff --git a/panels/notification/osd/windoweffect/package/main.qml b/panels/notification/osd/windoweffect/package/main.qml index ff2786fbc..d99717723 100644 --- a/panels/notification/osd/windoweffect/package/main.qml +++ b/panels/notification/osd/windoweffect/package/main.qml @@ -72,7 +72,7 @@ AppletItem { } ListView { - Accessible.id: "Listview" + Component.onCompleted: { Accessible.id = "Listview" } id: listview width: 410 height: contentHeight @@ -84,7 +84,7 @@ AppletItem { spacing: 10 delegate: D.ItemDelegate { - Accessible.id: "ItemView" + Component.onCompleted: { Accessible.id = "ItemView" } id: itemView padding: 0 diff --git a/panels/notification/plugin/NotifyAction.qml b/panels/notification/plugin/NotifyAction.qml index 1e532b9a1..1ed92a9b6 100644 --- a/panels/notification/plugin/NotifyAction.qml +++ b/panels/notification/plugin/NotifyAction.qml @@ -180,7 +180,7 @@ Control { } component NotifyActionButton: Button { - Accessible.id: "ActionButton" + Component.onCompleted: { Accessible.id = "ActionButton" } id: actionButton required property var actionData property var actionMenu: null diff --git a/panels/notification/plugin/NotifyItemContent.qml b/panels/notification/plugin/NotifyItemContent.qml index 1d283fc89..138cb920e 100644 --- a/panels/notification/plugin/NotifyItemContent.qml +++ b/panels/notification/plugin/NotifyItemContent.qml @@ -11,7 +11,7 @@ import org.deepin.ds.notification NotifyItem { Accessible.role: Accessible.ListItem - Accessible.id: "NotifyItem" + Component.onCompleted: { Accessible.id = "NotifyItem" } id: root implicitWidth: impl.implicitWidth implicitHeight: impl.implicitHeight @@ -118,7 +118,7 @@ NotifyItem { active: !(root.strongInteractive && root.actions.length > 0) && (root.closeVisible || closePlaceHolder.hovered) sourceComponent: SettingActionButton { Accessible.role: Accessible.Button - Accessible.id: "CloseBtn" + Component.onCompleted: { Accessible.id = "CloseBtn" } id: closeBtn objectName: "closeNotify-" + root.appName icon.name: "clean-alone" @@ -337,7 +337,7 @@ NotifyItem { Layout.topMargin: 8 sourceComponent: NotifyAction { Accessible.role: Accessible.Button - Accessible.id: "NotifyAction" + Component.onCompleted: { Accessible.id = "NotifyAction" } actions: root.actions onActionInvoked: function (actionId) { root.actionInvoked(actionId)