-
Notifications
You must be signed in to change notification settings - Fork 56
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
Another round of modernization and cleanup #836
Merged
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
It's deprecated since 6.6; use our own wrappers for older Qt.
QTimer::singleShot() was a pre-Qt5 idiomatic way to queue a method invocation; since Qt 5 we have a special static function for that.
This commit changes the non-generated code and GTAD templates; generated code comes next.
...otherwise each free function in the namespace has to explicitly mention Quotient:: and it's too easy to forget about it. (Also, replace explicit QLatin1StringView name calling with _L1)
Mainly, use constrained (aka ranges) algorithms instead of legacy ones.
...which is only one instance, apparently.
Use an anonymous namespace instead of `static` and `std::array` instead of a C array; inline matrixToUrlRegexInit() function at the only place it is called from.
The commitment is now checked to actually be valid base64 as we receive it. Also, it is stored as QByteArray now - thanks to QString and QByteArray having the same layout (3 pointers + alignment) we can get away with this without breaking ABI compat.
KitsuneRal
changed the title
Another round of modernization and cleeanup
Another round of modernization and cleanup
Nov 26, 2024
TobiasFella
approved these changes
Nov 26, 2024
Quality Gate passedIssues Measures |
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.
Best reviewed commit by commit. This is mainly about using
std::ranges
and dropping deprecated or unnecessary pieces; on top of that,util.cpp
is now entirely innamespace Quotient
because I got tired of remembering to prependQuotient::
when it comes to free functions; and I tried to improve commitment validation inKeyVerificationSession
a bit. I stopped short from comparing decoded hashes instead of base64-encoded ones but maybe decoding and comparing decoded hashes should be fiiine too?..