Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/qt/dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ BitcoinApplication::~BitcoinApplication()
#endif
// Delete Qt-settings if user clicked on "Reset Options"
QSettings settings;
if(optionsModel && optionsModel->resetSettings){
if(optionsModel && optionsModel->resetSettingsOnShutdown){
settings.clear();
settings.sync();
}
Expand Down
1 change: 1 addition & 0 deletions src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ void OptionsDialog::on_resetButton_clicked()

/* reset all options and close GUI */
model->Reset();
model->resetSettingsOnShutdown = true;
QApplication::quit();
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ void OptionsModel::Init(bool resetSettings)

checkAndMigrate();

this->resetSettings = resetSettings;

QSettings settings;

// Ensure restart flag is unset on client startup
Expand Down Expand Up @@ -226,7 +224,6 @@ void OptionsModel::Reset()

// Remove all entries from our QSettings object
settings.clear();
resetSettings = true; // Needed in dash.cpp during shotdown to also remove the window positions

// default setting for OptionsModel::StartAtStartup - disabled
if (GUIUtil::GetStartOnSystemStartup())
Expand Down
2 changes: 1 addition & 1 deletion src/qt/optionsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class OptionsModel : public QAbstractListModel
/* Restart flag helper */
void setRestartRequired(bool fRequired);
bool isRestartRequired() const;
bool resetSettings;
bool resetSettingsOnShutdown{false};

private:
/* Qt-only settings */
Expand Down