Skip to content

Commit ccec532

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: handle menu cleanup and visibility in SideBar
1. Added menu.destroy call when menu is closed to prevent memory leaks 2. Connected LauncherController.visibleChanged signal to close menu when launcher becomes invisible 3. Ensures proper cleanup of menu resources and prevents orphaned popups fix: 处理侧边栏菜单清理和可见性问题 1. 添加菜单关闭时的销毁调用以防止内存泄漏 2. 连接LauncherController.visibleChanged信号在启动器不可见时关闭菜单 3. 确保菜单资源的正确清理并防止弹出窗口残留 Pms: BUG-323063
1 parent fda5a9b commit ccec532

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

qml/windowed/SideBar.qml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ ColumnLayout {
7373
CategorizedSortProxyModel.categoryType = CategorizedSortProxyModel.Alphabetary
7474
}
7575
}
76+
77+
Connections {
78+
target: LauncherController
79+
function onVisibleChanged(visible) {
80+
if (!visible) {
81+
categorizedMenu.close()
82+
}
83+
}
84+
}
7685
}
7786
}
7887

0 commit comments

Comments
 (0)