-
Notifications
You must be signed in to change notification settings - Fork 58
feat: add tray plugins changed signal #1414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add tray plugins changed signal #1414
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a new tray pluginsChanged signal exposed from the TrayItem applet through DockDBusProxy and QML so external components (e.g., dde-control-center) can react when tray plugins change, and wires up emission from the tray QML when plugin surfaces are updated. Sequence diagram for tray pluginsChanged signal propagationsequenceDiagram
actor User
participant QML_Tray as QML_Tray
participant TrayItem as TrayItem
participant DockDBusProxy as DockDBusProxy
participant DBusInterface as org_deepin_dde_dock1
participant ExternalClient as dde_control_center
User->>QML_Tray: Trigger action that updates tray plugins
QML_Tray->>QML_Tray: onPluginSurfacesUpdated
QML_Tray->>TrayItem: emitPluginsChanged()
TrayItem->>TrayItem: Q_EMIT pluginsChanged
TrayItem-->>DockDBusProxy: pluginsChanged (Qt signal connection)
DockDBusProxy-->>DBusInterface: pluginsChanged (DBus signal)
DBusInterface-->>ExternalClient: pluginsChanged (DBus broadcast)
ExternalClient->>ExternalClient: Refresh tray plugin information
Class diagram for TrayItem and DockDBusProxy pluginsChanged integrationclassDiagram
class TrayItem {
+Q_INVOKABLE DockItemInfos dockItemInfos()
+Q_INVOKABLE void setItemOnDock(QString settingKey, QString itemKey, bool visible)
+Q_INVOKABLE void emitPluginsChanged()
+void trayPluginModelChanged()
+void quickPluginModelChanged()
+void fixedPluginModelChanged()
+void pluginsChanged()
-bool loopDockItemInfosModel(QAbstractItemModel model, std::function~bool(DockItemInfo)~ cb)
}
class DockDBusProxy {
+DockDBusProxy(DockPanel parent)
+void pluginVisibleChanged(QString pluginName, bool visible) const
+void pluginsChanged()
-DockPanel parent()
-TrayItem m_trayApplet
}
class org_deepin_dde_dock1_interface {
+signal pluginVisibleChanged(QString pluginName, bool visible)
+signal pluginsChanged()
}
TrayItem <.. DockDBusProxy : uses
DockDBusProxy ..> org_deepin_dde_dock1_interface : exposes_signals
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- Consider whether
pluginsChangedcan be aligned or consolidated with the existing*PluginModelChangedsignals (or emitted from the same code paths) to avoid having two parallel notification mechanisms that may diverge over time.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider whether `pluginsChanged` can be aligned or consolidated with the existing `*PluginModelChanged` signals (or emitted from the same code paths) to avoid having two parallel notification mechanisms that may diverge over time.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark 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 |
|
TAG Bot New tag: 2.0.28 |
emit plugins changed signal, then dde-control-center can obtain all plugin information in a timely manner. Log: add tray plugins changed signal Pms: BUG-311313
19674ef to
11e270d
Compare
deepin pr auto review代码审查报告本次代码变更主要涉及在 DDE Dock(任务栏)模块中添加一个 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进建议汇总
结论该代码变更实现了预期的功能,整体逻辑正确,风险较低。主要建议是采用更现代的 Qt 信号槽连接语法(函数指针 + |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
emit plugins changed signal, then dde-control-center can obtain all plugin information in a timely manner.
Log: add tray plugins changed signal
Pms: BUG-311313
Summary by Sourcery
Add a new tray plugins-changed signal and expose it over DBus so external components can react to plugin updates.
New Features: