fix: remove password visibility button key event handling#723
fix: remove password visibility button key event handling#723mhduiy merged 1 commit intolinuxdeepin:masterfrom
Conversation
Removed the event filter that was intercepting Enter/Return key presses on the password visibility toggle button. The button now uses default Qt button behavior for key events instead of custom handling. This change simplifies the code and ensures consistent behavior with standard Qt button interactions. The previous implementation specifically handled Enter/Return key presses to trigger button clicks when the button was not set as default. This custom logic has been removed to allow the button to use Qt's built-in key event handling mechanisms. Influence: 1. Test password visibility toggle functionality with mouse clicks 2. Verify Enter/Return key behavior in password fields 3. Check that button focus and activation work as expected 4. Test overall password edit widget behavior in forms 5. Verify no regression in password visibility toggling fix: 移除密码可见性按钮的按键事件处理 移除了拦截密码可见性切换按钮上 Enter/Return 按键的事件过滤器。现在按钮 使用 Qt 默认的按钮行为来处理按键事件,而不是自定义处理。这一更改简化了代 码,并确保与标准 Qt 按钮交互行为的一致性。 之前的实现专门处理了 Enter/Return 按键,以便在按钮未设置为默认按钮时触 发按钮点击。这一自定义逻辑已被移除,以允许按钮使用 Qt 内置的按键事件处理 机制。 Influence: 1. 测试通过鼠标点击切换密码可见性的功能 2. 验证密码字段中 Enter/Return 键的行为 3. 检查按钮焦点和激活功能是否按预期工作 4. 测试表单中密码编辑控件的整体行为 5. 验证密码可见性切换功能没有回归问题 PMS: BUG-341493
deepin pr auto review这段代码是一个删除操作的 Git diff,从 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进建议
总结这段代码变更在语法和性能上是安全的,但在功能逻辑上可能存在倒退(移除了键盘交互支持)。 最终建议:请确认移除该功能是否符合产品设计和无障碍访问规范。如果必须移除,请补充相应的文档说明或注释;如果是误删,请恢复代码并考虑使用 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
Removed the event filter that was intercepting Enter/Return key presses on the password visibility toggle button. The button now uses default Qt button behavior for key events instead of custom handling. This change simplifies the code and ensures consistent behavior with standard Qt button interactions.
The previous implementation specifically handled Enter/Return key presses to trigger button clicks when the button was not set as default. This custom logic has been removed to allow the button to use Qt's built-in key event handling mechanisms.
Influence:
fix: 移除密码可见性按钮的按键事件处理
移除了拦截密码可见性切换按钮上 Enter/Return 按键的事件过滤器。现在按钮
使用 Qt 默认的按钮行为来处理按键事件,而不是自定义处理。这一更改简化了代
码,并确保与标准 Qt 按钮交互行为的一致性。
之前的实现专门处理了 Enter/Return 按键,以便在按钮未设置为默认按钮时触
发按钮点击。这一自定义逻辑已被移除,以允许按钮使用 Qt 内置的按键事件处理
机制。
Influence:
PMS: BUG-341493