-
Notifications
You must be signed in to change notification settings - Fork 4
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
Rework FAUcardPaymentThread: add type annotations, fix crash #176
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
mgmax
commented
Jan 23, 2024
•
edited
Loading
edited
- Support checking FAUcardPaymentThread.py with mypy for type errors
- Fix crash after connection loss
- Remove the feature that allowed the user to "force terminate" the thread 60 seconds after pressing "abort"
- Rework and refactoring that makes the code better but should not change user-visible behavior
- Hopefully fixed some hidden bugs during the rework
mgmax
force-pushed
the
faucard-typing
branch
17 times, most recently
from
January 23, 2024 19:39
818cc84
to
a40ca37
Compare
If an Exception occured outside the main thread, then the app crashed hard and didn't show any error message to the user.
mgmax
force-pushed
the
faucard-typing
branch
from
February 16, 2024 16:07
cbd9b80
to
1e32861
Compare
Support checking FAUcardPaymentThread.py with mypy for future bugfixing. This commit should not cause any functional changes.
mgmax
force-pushed
the
faucard-typing
branch
from
February 16, 2024 16:12
1e32861
to
6d9da1a
Compare
mgmax
changed the title
REFACTOR FAUcardPaymentThread: add type annotations
Rework FAUcardPaymentThread: add type annotations, fix crash
Feb 16, 2024
…uring payment 1. FAUCard payment started 2. user presents card 3. user removes card just before the decrease command 4. user presses cancel 5. --> Bug: FAUCardPayment sent ACK twice
…ion broke at the same time
mgmax
force-pushed
the
faucard-typing
branch
from
February 18, 2024 14:14
b6f02fa
to
5d7adda
Compare
In summary, the code that handles the end of a payment is now improved, but still does the same as before. Probably a few bugs were fixed on the way. Remove the possibility to force-terminate the thread. Program behavior of QThread terminate() is not well-defined and may leave the program/memory in an undefined state, so we must not allow this. Remove confusing dialog box about user abortion. Remove confusing set_finish_log. Make clear that finish_log may only be used outside FAUCardThread. Rework thread closing. Remove some unused functions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.