-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Show a clear error if the key is found but the slots are not configured #11609
Show a clear error if the key is found but the slots are not configured #11609
Conversation
d15b262
to
d60c589
Compare
Our minimum version of Qt is 5.12 now so you should be able to use This message should also appear on the database open widget. We can show the same disabled drop down box as the database security view and also disable the checkbox too. |
I tried the first time but Ubuntu build failed on CI |
Note the case, qScopeGuard not QScopeGuard |
2f7c9de
to
5f144ae
Compare
@droidmonkey Thanks for your review; I have fixed it. |
I don't like that the keys are basically polled twice just to get an error message. Instead, I tweaked the What do you think? |
- Fix missed SCardDisconnect - Fix outdated test Fixes keepassxreboot#11543
5f144ae
to
53b5327
Compare
* Also fix delayed polling on window activation
53b5327
to
c41f27b
Compare
Yes, it's better and safer. Besides, polling twice caused an issue with the calling function that could freeze the UI thread. I suggest replacing:
@droidmonkey What do you think about it? |
The sign of the counter variable is irrelevant in this context and can actually produce underflow errors if you were to code in a -- by accident (ie, instead of -1 you'll get UINT_MAX). Either way this won't happen or matter because that isn't how this variable is handled in any context of the code. Generally speaking, the "only" time you need to use unsigned int is to use the full 32-bit length of an int to represent the numbers you need.
You cannot do this because std::chrono::milliseconds is actually a class and not convertible to an int to be used with Qt. It is not meant to indicate the variable contents by a name. |
Also, I tested this code with my 5 yubikeys and NFC reader, it worked flawlessly and reliably. Merging now. |
) Fixes #11543 Also fix delayed polling on window activation --------- Co-authored-by: w15dev <[email protected]> Co-authored-by: Jonathan White <[email protected]>
…passxreboot#11609) Fixes keepassxreboot#11543 Also fix delayed polling on window activation --------- Co-authored-by: w15dev <[email protected]> Co-authored-by: Jonathan White <[email protected]>
Fixes issue #11543
Screenshots
Testing strategy
Type of change