chore: implement dock item menus for DockGlobalElementModel#1229
chore: implement dock item menus for DockGlobalElementModel#1229BLumia merged 1 commit intolinuxdeepin:masterfrom
Conversation
deepin pr auto review这段代码主要是关于Dock任务管理器的停靠状态管理,我来对代码进行审查并提出改进意见:
总体而言,这段代码的功能实现是合理的,主要改进点在于代码的一致性、性能优化和安全性增强。通过上述改进,可以提高代码的可维护性和可靠性。 |
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Extract the "desktop/" element string formatting into a shared helper to avoid duplicating that logic in the model and parser.
- Guard the dataChanged emission in loadDockedElements against empty m_data to ensure you’re not emitting invalid index ranges.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Extract the "desktop/<id>" element string formatting into a shared helper to avoid duplicating that logic in the model and parser.
- Guard the dataChanged emission in loadDockedElements against empty m_data to ensure you’re not emitting invalid index ranges.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Reviewer's GuideThis PR centralizes dock state management by introducing a toggle API and renaming singular dock methods, ensures the UI model emits updated data for both docked and menu roles after loading, and wires up context‐menu actions (dock, force‐quit, close‐all) to these new APIs. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This patch is to continue prepare for linuxdeepin#1201, by add previously missing changed signal for Docked and Menu role when docked state is changed, and implementing actions for menu entries. This patch also make DnD on dock item works without using the legacy ItemModel class by implementing requestOpenUrls(). Log:
5a2fb99 to
e80a6c5
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich 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 |
This patch is to continue prepare for #1201, by add previously missing changed signal for Docked and Menu role when docked state is changed, and implementing actions for menu entries.
Summary by Sourcery
Enable dock item menus by wiring up dock/undock, force quit, and close-all actions and ensure UI roles update on docking state changes
New Features:
Enhancements: