mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Fix -resetguisettings
(#3624)
This commit is contained in:
parent
508fc2db4b
commit
8d99e7836c
@ -393,7 +393,7 @@ BitcoinApplication::~BitcoinApplication()
|
|||||||
#endif
|
#endif
|
||||||
// Delete Qt-settings if user clicked on "Reset Options"
|
// Delete Qt-settings if user clicked on "Reset Options"
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
if(optionsModel && optionsModel->resetSettings){
|
if(optionsModel && optionsModel->resetSettingsOnShutdown){
|
||||||
settings.clear();
|
settings.clear();
|
||||||
settings.sync();
|
settings.sync();
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,7 @@ void OptionsDialog::on_resetButton_clicked()
|
|||||||
|
|
||||||
/* reset all options and close GUI */
|
/* reset all options and close GUI */
|
||||||
model->Reset();
|
model->Reset();
|
||||||
|
model->resetSettingsOnShutdown = true;
|
||||||
QApplication::quit();
|
QApplication::quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,6 @@ void OptionsModel::Init(bool resetSettings)
|
|||||||
|
|
||||||
checkAndMigrate();
|
checkAndMigrate();
|
||||||
|
|
||||||
this->resetSettings = resetSettings;
|
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
// Ensure restart flag is unset on client startup
|
// Ensure restart flag is unset on client startup
|
||||||
@ -226,7 +224,6 @@ void OptionsModel::Reset()
|
|||||||
|
|
||||||
// Remove all entries from our QSettings object
|
// Remove all entries from our QSettings object
|
||||||
settings.clear();
|
settings.clear();
|
||||||
resetSettings = true; // Needed in dash.cpp during shotdown to also remove the window positions
|
|
||||||
|
|
||||||
// default setting for OptionsModel::StartAtStartup - disabled
|
// default setting for OptionsModel::StartAtStartup - disabled
|
||||||
if (GUIUtil::GetStartOnSystemStartup())
|
if (GUIUtil::GetStartOnSystemStartup())
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
/* Restart flag helper */
|
/* Restart flag helper */
|
||||||
void setRestartRequired(bool fRequired);
|
void setRestartRequired(bool fRequired);
|
||||||
bool isRestartRequired() const;
|
bool isRestartRequired() const;
|
||||||
bool resetSettings;
|
bool resetSettingsOnShutdown{false};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* Qt-only settings */
|
/* Qt-only settings */
|
||||||
|
Loading…
Reference in New Issue
Block a user