-
Notifications
You must be signed in to change notification settings - Fork 38.6k
qt, refactor: Make BitcoinUnits::Unit a scoped enum #17877
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
Conversation
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, and change LGTM.
|
Concept ACK: structured is better than unstructured :) |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK. will review later this week |
|
Concept ACK. |
|
Concept ACK |
cf95074 to
22be3d6
Compare
|
Rebased after #17453 has been merged. |
22be3d6 to
4ead3f4
Compare
4ead3f4 to
cca2ebd
Compare
|
Rebased 4ead3f4 -> cca2ebd (pr17877.03 -> pr17877.04) due to the conflict with #17905. |
|
Maybe split out the scripted-diff into a separate pull request: https://github.com/bitcoin-core/gui/pulls It seems that it can be reviewed by anyone familiar with C++. As opposed to the latter commits, which require specific gui knowledge. |
Done: bitcoin-core/gui#3
Should they be also moved to https://github.com/bitcoin-core/gui ? |
25f3554 scripted-diff: Make SeparatorStyle a scoped enum (Hennadii Stepanov) Pull request description: This PR is [split](bitcoin/bitcoin#17877 (comment)) from bitcoin/bitcoin#17877 and makes `BitcoinUnits::SeparatorStyle` a scoped enum. ACKs for top commit: MarcoFalke: review ACK 25f3554 🚐 Tree-SHA512: 578f1340a476cf79faa109a83815d3c75e26d9c18873e653d7624b52428ccb2677293116db0a60ae14c949d63b64988fc5a39c7184c2352b87b00e8ddaaaf474
cbd498e to
1a348c8
Compare
|
Rebased cbd498e -> 1a348c8 (pr17877.10 -> pr17877.11) due to the merging of bitcoin-core/gui#3. |
1a348c8 to
72819bd
Compare
|
Rebased 1a348c8 -> 72819bd (pr17877.11 -> pr17877.12) due to the conflict with #19314. |
72819bd to
1575ffb
Compare
|
Updated 72819bd -> 1575ffb (pr17877.12 -> pr17877.13, diff):
|
This change improves type safety.
Since BitcoinUnits::Unit became a scoped enum, BitcoinUnits::valid() gets needless.
1575ffb to
243205f
Compare
|
Rebased 1575ffb -> 243205f (pr17877.13 -> pr17877.14) due to the conflict with #19011. |
|
Lots of Concept ACKs, but not really any review in 6 months. Lets try and kick-start this over on the GUI repo. |
|
Moved to bitcoin-core/gui#60. |
Since Qt 5.5 there are means to register an enum type with the meta-object system (such enum still lacks an ability to interact with
QSettings::setValue()andQSettings::value()without defined stream operators).In order to reduce global namespace polluting and to force strong type checking, this PR:
BitcoinUnits::SeparatorStylea scoped enum (done in scripted-diff: Make SeparatorStyle a scoped enum bitcoin-core/gui#3)BitcoinUnits::Unita scoped enum (typedef BitcoinUnits::Unit BitcoinUnit;)BitcoinUnitsclass and its functions