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

Reply focus state fix. #712

Closed
wants to merge 1 commit into from
Closed

Conversation

ntoll
Copy link
Contributor

@ntoll ntoll commented Jan 20, 2020

Description

Fixes #691 (sort of -- see below).

I've spent some time looking into this and it was turning into a time sink of pig wrestling with Qubes and/or Debian.

Here's my approach and I'd appreciate some testing / feedback please on those systems where it's not be observed to work (despite my best efforts, I can't recreate the problem).

The placeholder text that's not clearing is handled by the ReplyTextEdit's focusInEvent and focusOutEvent. In both these event handlers there's a check to ensure there's no text currently in the widget. If there isn't, the placeholder logic happens and the UI is updated as expected.

I notice that when a reply is sent via the ReplyBoxWidet's send_reply method, the textual content was being set to blank after the lines of code which act on the sending of code. My thinking (in the blind as it were, because I can't recreate this problem), is that something in these previous lines of code was blocking so that any focus change was happening before the text was set to empty meaning the afore mentioned logic in the focusInEvent and focusOutEvent events wasn't firing. By setting it to empty immediately before the logic for sending the reply, I hope this problem is avoided.

My only further idea is that it's a "Debian's version of Qt5" problem. I.e. my version of Qt5.11 is from the official Python wheels. Is your version packaged via Debian? If so, you should know they regularly patch and change such libs so while we're using the same version, we're potentially not using the same version thanks to Debian packaging.

Not sure what more to suggest. :-/ As always feedback and comments most welcome.

Test Plan

None needed, this is just a re-arrangement of existing lines of code.

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, packaging logic (e.g., the AppArmor profile) may need to be updated. Please check as applicable:

  • I have submitted a separate PR to the packaging repo
  • No update to the packaging logic (e.g., AppArmor profile) is required for these changes
  • I don't know and would appreciate guidance

@ntoll
Copy link
Contributor Author

ntoll commented Jan 22, 2020

This PR is superseded by changes in #688. Closing.

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.

ReplyBox sourcename sometimes no longer disappears after sending a reply
1 participant