diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-02-09 20:05:27 +0000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-02-09 20:11:11 +0000 |
commit | 1313b9073574be0c7d859ebd6bab2bd09192fe6d (patch) | |
tree | fa85cea5d160c02c58ede394d4e589a1242f652f /src/qt/optionsmodel.cpp | |
parent | af2bd07587b62b719b596b35e6fd54c60f747bd4 (diff) | |
parent | 4de02def844102c08b65bf1311a333e7aca482b9 (diff) |
Merge bitcoin-core/gui#701: Persist Mask Values option
4de02def844102c08b65bf1311a333e7aca482b9 qt: Persist Mask Values option (Andrew Chow)
Pull request description:
The mask values option is memory only. If a user has enabled this option, it's reasonable to expect that they would want to have it enabled on the next start.
ACKs for top commit:
RandyMcMillan:
tACK https://github.com/bitcoin-core/gui/commit/4de02def844102c08b65bf1311a333e7aca482b9
jarolrod:
tACK 4de02def844102c08b65bf1311a333e7aca482b9
pablomartin4btc:
> tACK [4de02de](https://github.com/bitcoin-core/gui/commit/4de02def844102c08b65bf1311a333e7aca482b9)
john-moffett:
tACK 4de02def844102c08b65bf1311a333e7aca482b9
Tree-SHA512: 247deb78df4911516625bf8b25d752feb480ce30eb31335cf9baeb07b7c6c225fcc37d5c45de62d6e6895ec10c7eefabb15527e3c9723a3b8ddda1e12ebbf46b
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 00b7952ca4..761351468e 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -227,6 +227,8 @@ bool OptionsModel::Init(bilingual_str& error) m_use_embedded_monospaced_font = settings.value("UseEmbeddedMonospacedFont").toBool(); Q_EMIT useEmbeddedMonospacedFontChanged(m_use_embedded_monospaced_font); + m_mask_values = settings.value("mask_values", false).toBool(); + return true; } @@ -435,6 +437,8 @@ QVariant OptionsModel::getOption(OptionID option) const return SettingToBool(setting(), DEFAULT_LISTEN); case Server: return SettingToBool(setting(), false); + case MaskValues: + return m_mask_values; default: return QVariant(); } @@ -612,6 +616,10 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value) setRestartRequired(true); } break; + case MaskValues: + m_mask_values = value.toBool(); + settings.setValue("mask_values", m_mask_values); + break; default: break; } |