Skip to content

fix: Handle QLineEdit focus object correctly with QCompleter in Qt6 #7

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

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

wyu71
Copy link
Contributor

@wyu71 wyu71 commented Jun 18, 2025

In Qt6, when using QLineEdit with QCompleter during Chinese input:

  • qGuiApp->focusObject() and realFocusObject are both QLineEdit
  • This is logically correct as the focus is indeed on QLineEdit
  • However, it caused filterEvent to return false and trigger unwanted keypress events
  • Remove redundant check to ensure proper input method handling

Log: Handle QLineEdit focus object correctly with QCompleter in Qt6
Upstream: fcitx/fcitx5-qt#71

In Qt6, when using QLineEdit with QCompleter during Chinese input:
- qGuiApp->focusObject() and realFocusObject are both QLineEdit
- This is logically correct as the focus is indeed on QLineEdit
- However, it caused filterEvent to return false and trigger unwanted keypress events
- Remove redundant check to ensure proper input method handling

Log: Handle QLineEdit focus object correctly with QCompleter in Qt6
Upstream: fcitx/fcitx5-qt#71
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign liujianqiang-niu for approval. For more information see the Code Review Process.

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

Copy link

TAG Bot

TAG: 5.1.8-2deepin3
EXISTED: no
DISTRIBUTION: unstable

@Zeno-sole Zeno-sole merged commit f11e508 into deepin-community:master Jun 18, 2025
4 of 7 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.

3 participants