Skip to content

Commit 91b66ea

Browse files
committed
fix: reorder dock icon creation before plugin registration
The plugin icon widget must be fully initialized before registering with the proxy interface to ensure the dock manager has a valid widget reference when the itemAdded event is processed. Log: Fixed plugin loading order for dock update icon Influence: 1. Verify dock update icon appears correctly after plugin loading 2. Test plugin enable/disable flow to ensure consistent state 3. Check no visual artifacts or crashes on dock startup 4. Validate icon update behavior with different update states fix: 调整停靠栏图标创建顺序至插件注册之前 插件图标部件必须在向代理接口注册之前完全初始化,以确保停靠栏管理器在处理 itemAdded 事件时拥有有效的部件引用。 Log: 修复插件加载顺序以正确显示更新图标 Influence: 1. 验证插件加载后更新图标正常显示 2. 测试插件启用/禁用流程,确保状态一致性 3. 检查停靠栏启动时无视觉异常或崩溃 4. 验证不同更新状态下图标更新行为 PMS: BUG-359275
1 parent 0c44195 commit 91b66ea

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/dock-update-plugin/pluginupdateplugin.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,14 @@ void PluginUpdatePlugin::loadPlugin()
229229
if (m_pluginLoaded) {
230230
return;
231231
}
232-
m_proxyInter->itemAdded(this, UPDATE_STATE_KEY);
233-
m_pluginLoaded = true;
234-
235232
m_dockIcon.reset(new DockIconWidget);
236233
m_dockIcon->setFixedSize(Dock::DOCK_PLUGIN_ITEM_FIXED_SIZE);
237234

238235
updateIconState();
236+
237+
m_proxyInter->itemAdded(this, UPDATE_STATE_KEY);
238+
m_pluginLoaded = true;
239+
239240
displayModeChanged(displayMode());
240241
}
241242

0 commit comments

Comments
 (0)