-
Notifications
You must be signed in to change notification settings - Fork 314
Persist "mask values" in gui #655
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
#include <qt/transactiontablemodel.h> | ||
#include <qt/walletmodel.h> | ||
|
||
#include <QSettings> | ||
|
||
#include <QAbstractItemDelegate> | ||
#include <QApplication> | ||
#include <QDateTime> | ||
|
@@ -176,6 +178,9 @@ void OverviewPage::handleTransactionClicked(const QModelIndex &index) | |
|
||
void OverviewPage::setPrivacy(bool privacy) | ||
{ | ||
QSettings settings; | ||
settings.setValue("privacy", privacy); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In commit "Persist "mask values" in gui" (9fde0ba) I don't think this is too important, but I'm not sure if I agree with furszy's comment that this setting needs to be part of But probably it would be better to pick one approach or the other. Either don't add the setting to OptionsModel and use QSettings to read and write. Or do add the setting to OptionsModel and use OptionsModel to read and write. Otherwise you wind up causing inconsistent access to the setting across layers that furszy was trying to avoid #655 (review) |
||
|
||
m_privacy = privacy; | ||
if (m_balances.balance != -1) { | ||
setBalance(m_balances); | ||
|
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 commit "Persist "mask values" in gui" (9fde0ba)
This change to
SettingName
function doesn't do anything and should be reverted.SettingName
mapsOptionModel
enum values tobitcoin.conf
/ command line option names, and there is no "-privacy" option, so this wouldn't do the right thing even if the case was ever used.If you want to use
OptionsModel
to read and write this setting, instead of changing theSettingName
function, you should change theOptionsModel::getOption()
function by adding:And the
OptionsModel::setOption()
function by adding:You could grep
CoinControlFeatures
orEnablePSBTControls
to see how another similar GUI settings implemented inOptionsModel
.