gui icon indicating copy to clipboard operation
gui copied to clipboard

qt - Persist "mask values" in gui

Open jadijadi opened this issue 3 years ago • 4 comments

fixes https://github.com/bitcoin-core/gui/issues/652

jadijadi avatar Aug 25 '22 11:08 jadijadi

Need to add an option inside the OptionsModel and use setOption to store/update it. Not call directly the backend function, it breaks the layers division.

Thanks for the important note. I'm traveling this week with limited access to my dev machine / internet but will try to provide a fix per your suggestion soon. Thanks again.

jadijadi avatar Sep 12 '22 12:09 jadijadi

Need to add an option inside the OptionsModel and use setOption to store/update it. Not call directly the backend function, it breaks the layers division.

Also, instead of using Node::getPersistentSetting and Node::updateRwSetting methods, this should probably use QSettings::value and QSettings::setValue methods to access the setting. If you look at OptionsModel you can see that it uses QSettings to store GUI preferences. The Node methods are only used to store settings which are bitcoind command line or configuration file options (and -privacy is not a bitcoind option).

ryanofsky avatar Sep 12 '22 17:09 ryanofsky

tested ACK

Thanks for the tests & ACK. I've done some changes based on the comments from @ryanofsky and @furszy . Can you please have another look? Thank you in advance.

jadijadi avatar Sep 23 '22 07:09 jadijadi

Need to add an option inside the OptionsModel and use setOption to store/update it. Not call directly the backend function, it breaks the layers division.

Also, instead of using Node::getPersistentSetting and Node::updateRwSetting methods, this should probably use QSettings::value and QSettings::setValue methods to access the setting. If you look at OptionsModel you can see that it uses QSettings to store GUI preferences. The Node methods are only used to store settings which are bitcoind command line or configuration file options (and -privacy is not a bitcoind option).

thanks @ryanofsky & @furszy . I've updated the PR based your comment; via OptionsModel.

jadijadi avatar Sep 23 '22 07:09 jadijadi

It looks like #701 is being actively reviewed recently. Let's combine all discussions there.

hebasto avatar Feb 07 '23 14:02 hebasto

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hernanmarino

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

DrahtBot avatar Feb 07 '23 14:02 DrahtBot