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

no longer access source db obj in snippet #964

Merged
merged 2 commits into from
Mar 21, 2020
Merged

no longer access source db obj in snippet #964

merged 2 commits into from
Mar 21, 2020

Conversation

sssoleileraaa
Copy link
Contributor

Description

Towards #906 and minimizing access of database objects in the GUI.

Test Plan

  1. Regression test the preview snippet
  2. Review code to see that we no longer need to worry about source db object deletions in set_snippet because it no longer accesses self.source.collection or self.source.uuid

(Next step/PR is to make sure update doesn't raise an exception in the SourceWidget constructor.)

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

Copy link
Contributor

@rmol rmol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good, I couldn't induce a crash by deleting a source as a message was incoming. Could be down to my rusty gaming reflexes, though.

Snippets for replies, messages, and files were updated correctly. Long snippets were truncated properly.

The only thing I saw was that the return type of get_source_widget should be Optional[QListWidget].

securedrop_client/gui/widgets.py Outdated Show resolved Hide resolved
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.

2 participants