fix(ddialog): reject on close to avoid accepted() - #764
Conversation
There was a problem hiding this comment.
Sorry @MyLeeJiEun, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates DDialog’s close handling so that closing via the window’s X button consistently rejects the dialog instead of completing it using a stale clicked button index, aligning behavior with QDialog::closeEvent and preventing false accepted() signals. Sequence diagram for updated DDialog closeEvent rejection behaviorsequenceDiagram
actor User
participant WindowManager
participant DDialog
User->>WindowManager: clickXButton
WindowManager->>DDialog: closeEvent(event)
DDialog->>DDialog: Q_EMIT aboutToClose()
DDialog->>DDialog: reject()
DDialog->>DDialog: Q_EMIT visibleChanged(isVisible())
DDialog->>DDialog: Q_EMIT closed()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1. Window close (X button) now calls reject() instead of done(clickedButtonIndex) 2. Stale button index was misinterpreted as DialogCode, so closing after Confirm emitted accepted() and sent the old password to the auth session 3. Behavior now matches QDialog::closeEvent: closing the window always means rejection 4. Cancel button and ESC key paths are unaffected Log: Window close now always rejects, fixing false accepted() from the stale button index Influence: X close now rejects, no more false accepted() fix(ddialog): 关闭窗口时始终拒绝,避免误触发 accepted() 1. X 关闭时改为调用 reject(),不再用残留的按钮索引 2. 修复先点确认再点 X 关闭时误触发 accepted()、把旧密码发送给认证会话的问题 3. 与 QDialog::closeEvent 语义一致:关闭窗口即拒绝 4. Cancel 按钮与 ESC 键路径不受影响 Log: 窗口关闭(X 按钮)始终走 reject,修复残留按钮索引误触发 accepted() 的问题 PMS: BUG-371549 Influence: 修复鉴权框点 X 关闭误发密码、误触发 accepted() 的问题
d036bec to
82b5f16
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, MyLeeJiEun 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: blocked) |
Log: Window close now always rejects, fixing false accepted() from the stale button index
Influence: X close now rejects, no more false accepted()
fix(ddialog): 关闭窗口时始终拒绝,避免误触发 accepted()
Log: 窗口关闭(X 按钮)始终走 reject,修复残留按钮索引误触发 accepted() 的问题
PMS: BUG-371549
Influence: 修复鉴权框点 X 关闭误发密码、误触发 accepted() 的问题
Summary by Sourcery
Bug Fixes: