fix: remove unnecessary platform check in AppItem tooltip#1566
fix: remove unnecessary platform check in AppItem tooltip#1566deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
1. Removed the platform-specific check `Qt.platform.pluginName === "xcb"` from the `onEntered` function 2. The condition now only checks if there are no windows, regardless of the platform 3. This fix ensures consistent tooltip behavior across all display backends (X11/Wayland) Influence: 1. Verify tooltip shows correctly when no windows are open on X11 2. Verify tooltip shows correctly when no windows are open on Wayland 3. Test tooltip behavior when windows are present on both platforms 4. Ensure no regression in existing tooltip functionality fix: 移除AppItem工具提示中不必要的平台检查 1. 从`onEntered`函数中移除了平台特定的检查`Qt.platform.pluginName === "xcb"` 2. 现在条件仅检查是否有窗口存在,与平台无关 3. 此修复确保在所有显示后端(X11/Wayland)上工具提示行为一致 Influence: 1. 验证在X11上无窗口时工具提示正常显示 2. 验证在Wayland上无窗口时工具提示正常显示 3. 测试两种平台上存在窗口时的工具提示行为 4. 确保现有工具提示功能无回归问题 PMS: BUG-344907
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves a platform-specific Qt plugin check from the AppItem tooltip enter/exit handlers so that tooltip visibility is controlled solely by whether any windows exist, ensuring consistent behavior across X11 and Wayland. Flow diagram for updated AppItem tooltip onEntered and onExited logicflowchart TD
A_Hover_enter[User hovers over AppItem]
B_Check_windows_on_enter{windows.length === 0}
C_Start_tooltip_timer[Start toolTipShowTimer]
D_Exit_enter_handler[Return from onEntered]
E_Show_previews_or_other_behavior[Handle case when windows exist]
A_Hover_enter --> B_Check_windows_on_enter
B_Check_windows_on_enter -->|true| C_Start_tooltip_timer
C_Start_tooltip_timer --> D_Exit_enter_handler
B_Check_windows_on_enter -->|false| E_Show_previews_or_other_behavior
F_Hover_leave[User leaves AppItem]
G_Stop_preview_timer[Stop previewTimer]
H_Check_windows_on_exit{windows.length === 0}
I_Close_tooltip[Close toolTip]
J_Exit_exit_handler[Return from onExited]
K_Keep_tooltip_or_previews[Keep existing tooltip or preview behavior]
F_Hover_leave --> G_Stop_preview_timer
G_Stop_preview_timer --> H_Check_windows_on_exit
H_Check_windows_on_exit -->|true| I_Close_tooltip
I_Close_tooltip --> J_Exit_exit_handler
H_Check_windows_on_exit -->|false| K_Keep_tooltip_or_previews
classDef default fill:#f5f5f5,stroke:#333,stroke-width:1px
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review这段代码的修改移除了对 1. 语法逻辑审查现状: 分析:
2. 代码质量审查改进点:
潜在风险:
3. 代码性能审查
4. 代码安全审查
综合改进建议
总结该修改在语法和逻辑上是正确的,提升了代码的通用性和性能,但需要确保在所有目标平台上的行为一致性。建议补充测试和注释以增强代码的健壮性和可维护性。 |
|
[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 |
|
/forcemerge |
|
This pr force merged! (status: behind) |
Qt.platform.pluginName === "xcb"from theonEnteredfunctionInfluence:
fix: 移除AppItem工具提示中不必要的平台检查
onEntered函数中移除了平台特定的检查Qt.platform.pluginName === "xcb"Influence:
PMS: BUG-344907
Summary by Sourcery
Bug Fixes: