Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复大多数按钮不响应enter事件 #569

Merged
merged 1 commit into from
May 9, 2024

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented May 7, 2024

修复大多数按钮不响应enter事件,仅支持DApplication应用

Log: 修复大多数按钮不响应enter事件
Bug: https://pms.uniontech.com/bug-view-253935.html
Influence: 按钮响应键盘回车事件

cherry-pick form: https://gerrit.uniontech.com/c/dtkwidget/+/239241

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request May 7, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#569
@kegechen
Copy link
Contributor Author

kegechen commented May 7, 2024

@Whale107

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 7, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

@kegechen kegechen requested a review from zccrs May 8, 2024 07:55
src/widgets/dapplication.cpp Show resolved Hide resolved
修复大多数按钮不响应enter事件,仅支持DApplication应用

Log: 修复大多数按钮不响应enter事件
Bug: https://pms.uniontech.com/bug-view-253935.html
Influence: 按钮响应键盘回车事件
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request May 9, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#569
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • 在新添加的代码中使用了 dynamic_cast,建议检查是否有必要进行类型转换,并确保转换的安全性。
  • 使用 Q_EMIT 进行信号发射时,没有检查 btn 是否为 nullptr,可能会导致运行时错误。
  • 对于 QEvent::KeyPress 的处理,应该确保 objfocusWidget(),以避免不必要的重定向。

是否建议立即修改:

@kegechen kegechen requested a review from zccrs May 9, 2024 02:08
@kegechen
Copy link
Contributor Author

kegechen commented May 9, 2024

use QPlatformTheme::ButtonPressKeys for pressing buttons

https://codereview.qt-project.org/c/qt/qtbase/+/394849

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kegechen, zccrs

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kegechen
Copy link
Contributor Author

kegechen commented May 9, 2024

/retest

1 similar comment
@kegechen
Copy link
Contributor Author

kegechen commented May 9, 2024

/retest

@kegechen
Copy link
Contributor Author

kegechen commented May 9, 2024

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 9, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 9ad1443 into linuxdeepin:master May 9, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants