fix(dock): eliminate several QML runtime/compile warnings - #1711
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideRemoves several QML runtime and registration warnings by making signal and view lookups safe, replacing the deprecated task-item add animation syntax, breaking dock sizing binding loops, supplying explicit drag-image sizes, and correcting the tray drop-index QML type name while preserving existing behavior. Flow diagram for warning-safe dock and notification behaviorflowchart LR
ShellSurface[Shell surface] -->|cursorShapeRequested| Proxy[ShellSurfaceItemProxy]
Proxy -->|ignore unknown signals| SafeSignal[Warning-free signal handling]
TaskModel[Task manager model] --> ListView[ListView]
ListView -->|add Transition| AddAnimation[Scale and opacity animation]
DockLayout[Dock layout] -->|useColumnLayout| DockSize[Return dockSize directly]
DockLayout -->|other direction| ContentSize[Compute content-based size]
DragItem[Dock or tray item] -->|grabToImage(width,height)| DragImage[Explicit-size drag image]
ListViewView[ListView.view] -->|exists| Overlap[panelShown lookup]
ListViewView -->|missing| Disabled[Animation disabled]
DropIndex[DropIndex gadget] -->|QML_NAMED_ELEMENT| dropIndex[dropIndex value type]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
4d5e6ee to
c879751
Compare
1. ShellSurfaceItemProxy: set Connections.ignoreUnknownSignals so the
cursorShapeRequested handler no longer warns for surfaces lacking the
signal.
2. TaskManager: replace the deprecated ListView.onAdd NumberAnimation
object-to-signal-handler assignment with a declarative add Transition.
3. TaskManager: break the implicitWidth/implicitHeight binding loop by
returning the dock size directly in the spanning layout direction.
4. AppItem/DragItem/ActionLegacyTrayPluginDelegate: pass an explicit
target size to grabToImage to avoid the Ignoring sourceSize request
warning.
5. OverlapNotify: guard the panelShown lookup so an undefined
ListView.view no longer assigns undefined to a bool property.
6. trayitempositionmanager: register the DropIndex gadget as dropIndex
lowercase so qmltyperegistrar stops warning about its value-type name.
7. trayitempositionmanager: use Qt::QueuedConnection for the
dockHeightChanged -> updateVisualSize connection, breaking the
synchronous C++ signal/slot cascade that causes "Binding loop detected
for dockItemMaxSize". When dockSize changes (e.g. during drag),
dockHeightChanged previously fired synchronously, calling
updateVisualSize -> setProperty("visualSize") -> visualSizeChanged,
which marked dockItemMaxSize dirty (it transitively reads visualSize
via dockRawCenterSpace -> dockRightPart -> tray). Queuing the slot lets
the current binding evaluation finish before visualSize updates.
Log: fix multiple QML warnings reported by journalctl/qmltyperegistrar
Influence:
1. Verify dock shell surface cursor shape handling still works
2. Verify task manager item add animation still plays
3. Verify dock auto-size layout is unchanged
4. Verify drag image rendering for dock and tray items
5. Verify notification overlap animation initialization
6. Verify dock icon size after dragging dock height
7. Verify no "Binding loop for dockItemMaxSize" warnings during drag
fix(dock): 消除任务栏与通知中心若干 QML 运行时/注册告警
1. ShellSurfaceItemProxy:为 Connections 设置 ignoreUnknownSignals,
使 cursorShapeRequested 处理器对缺少该信号的 surface 不再告警。
2. TaskManager:将弃用的 ListView.onAdd NumberAnimation 对象赋值给
信号处理器的写法改为声明式 add Transition。
3. TaskManager:在占满布局方向直接返回 dock 尺寸,打断
implicitWidth/implicitHeight 绑定环。
4. AppItem/DragItem/ActionLegacyTrayPluginDelegate:为 grabToImage 传入
显式目标尺寸,避免 Ignoring sourceSize request 告警。
5. OverlapNotify:对 panelShown 查询加空值守卫,避免未定义的
ListView.view 将 undefined 赋给 bool 属性。
6. trayitempositionmanager:将 DropIndex gadget 注册为 dropIndex
小写,使 qmltyperegistrar 不再告警其值类型名。
7. trayitempositionmanager:将 dockHeightChanged 到 updateVisualSize
的连接改为 Qt::QueuedConnection,打断同步 C++ 信号/槽级联,解决
"Binding loop detected for dockItemMaxSize"。dockSize 变化时(如
拖拽),dockHeightChanged 此前同步触发 updateVisualSize ->
setProperty("visualSize") -> visualSizeChanged,使 dockItemMaxSize
(经 dockRawCenterSpace -> dockRightPart -> tray 间接读取 visualSize)
被标记为脏。改为队列连接后,当前绑定求值可先完成,visualSize 在
下一次事件循环中更新,不再触发绑定环。
Log: 修复 journalctl/qmltyperegistrar 报告的多项 QML 告警
Influence:
1. 验证任务栏 shell surface 光标形状处理仍正常
2. 验证任务管理器条目添加动画仍播放
3. 验证任务栏自适应尺寸布局不变
4. 验证任务栏与托盘条目拖拽图像渲染
5. 验证通知重叠动画初始化
6. 验证拖拽任务栏高度后图标尺寸正确
7. 验证拖拽时不再出现 "Binding loop for dockItemMaxSize" 告警
PMS: TASK-394379
c879751 to
c2e1cec
Compare
Log: fix multiple QML warnings reported by journalctl/qmltyperegistrar
Influence:
fix(dock): 消除任务栏与通知中心若干 QML 运行时/注册告警
Log: 修复 journalctl/qmltyperegistrar 报告的多项 QML 告警
Influence:
PMS: TASK-394379
Summary by Sourcery
Remove QML runtime and type-registration warnings across dock, task manager, tray, and notification components while preserving existing behavior.
Bug Fixes:
Enhancements: