-
Notifications
You must be signed in to change notification settings - Fork 38.7k
qt: Add "Blocksdir" to Debug window #14374
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
qt: Add "Blocksdir" to Debug window #14374
Conversation
|
Concept ACK |
|
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. Could have a way to tell if it's the default blocks directory or user supplied.
src/qt/clientmodel.cpp
Outdated
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.
Should not call GetBlockDir but get it from interfaces::Node? cc @ryanofsky
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.
In the long run, promag is right and adding an interfaces::Node method would be better, but for now calling GetBlocksDir() directly is more consistent with existing code. The goal of adding the Node and Wallet interfaces in #10244 was to get rid of accesses to non-GUI global variables from GUI code. But to make the change more minimal, I exempted gArgs and chainparams variables, and instead added some glue code in #10102 to let each process just keep its own copies of these variables. As a result, it's fine to call functions like GetBlocksDir and GetDataDir from GUI code that access them.
|
@promag and/or a tooltip that explains this location can be customized using Agree we need to clarify if |
|
@Sjors @promag
Besides Nevertheless, I agree with all of you: @ryanofsky's review will be much appreciated. |
To get the current blocksdir is valuable for debug purposes after merging bitcoin#12653.
16d79b0 to
bde3946
Compare
Sjors
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.
tACK bde3946 modulo the tooltip html.
src/qt/forms/debugwindow.ui
Outdated
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.
What's with the <html><head/><body><p>? This probably makes the tooltip hard to translate.
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.
It uses HTML code ‑ for the non-breaking hyphen character. Otherwise, the tooltip can looks ugly.
This LOC has been generated by Qt Creator and, therefore, the translation should be treated in a correct way. Or did I miss something?
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.
The &#8209; bit seems fine, but I was talking about the html etc prefix. I think most developers use a text editor instead of the Qt Creator tools. Perhaps @laanwj knows if this works with the translation system?
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.
Can you just use the utf8-encoding of the chr(8209) character? ‑? Presumably then you wouldn't need the html stuff.
ryanofsky
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.
utACK bde394669ff5dc666d8b8ad1c0e74244a427eec0
src/qt/forms/debugwindow.ui
Outdated
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.
Can you just use the utf8-encoding of the chr(8209) character? ‑? Presumably then you wouldn't need the html stuff.
bde3946 to
2ab9140
Compare
You are right. I've missed this warning Avoid HTML in translation strings @ryanofsky Tooltips are fixed. Please re-review. |
ryanofsky
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.
utACK 2ab9140 but I think it would be better if you just literally wrote the nonbreaking hyphen in the XML as a utf8-encoded character (as suggested previously):
- <string>To specify a non-default location of the data directory use the '%1' option.</string>
+ <string>To specify a non-default location of the data directory use the '‑datadir' option.</string>
- <string>To specify a non-default location of the blocks directory use the '%1' option.</string>
+ <string>To specify a non-default location of the blocks directory use the '‑blocksdir' option.</string>|
Actually I like the utACK 2ab9140 |
|
Tested a bit. |
|
Concept ACK |
2ab9140 Add tooltips for both datadir and blocksdir (Hennadii Stepanov) 3045704 Add "Blocksdir" to Debug window (Hennadii Stepanov) Pull request description: To get the current `blocksdir` is valuable for debug purposes after merging #12653.  Tree-SHA512: a93f2c00ee19cf6acb499d3bd9bccf4be8ef01c53c44d917ad401aa4797db02cbccb71a9c24e05262ea09345e15f9299381367fdc6951f21dd3788a4a58d2132
2ab9140 Add tooltips for both datadir and blocksdir (Hennadii Stepanov) 3045704 Add "Blocksdir" to Debug window (Hennadii Stepanov) Pull request description: To get the current `blocksdir` is valuable for debug purposes after merging bitcoin#12653.  Tree-SHA512: a93f2c00ee19cf6acb499d3bd9bccf4be8ef01c53c44d917ad401aa4797db02cbccb71a9c24e05262ea09345e15f9299381367fdc6951f21dd3788a4a58d2132
2ab9140 Add tooltips for both datadir and blocksdir (Hennadii Stepanov) 3045704 Add "Blocksdir" to Debug window (Hennadii Stepanov) Pull request description: To get the current `blocksdir` is valuable for debug purposes after merging bitcoin#12653.  Tree-SHA512: a93f2c00ee19cf6acb499d3bd9bccf4be8ef01c53c44d917ad401aa4797db02cbccb71a9c24e05262ea09345e15f9299381367fdc6951f21dd3788a4a58d2132

To get the current
blocksdiris valuable for debug purposes aftermerging #12653.