File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,12 @@ BitcoinApplication::~BitcoinApplication()
359
359
delete paymentServer;
360
360
paymentServer = 0 ;
361
361
#endif
362
+ // Delete Qt-settings if user clicked on "Reset Options"
363
+ QSettings settings;
364
+ if (optionsModel->resetSettings ){
365
+ settings.clear ();
366
+ settings.sync ();
367
+ }
362
368
delete optionsModel;
363
369
optionsModel = 0 ;
364
370
}
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ void OptionsModel::addOverriddenOption(const std::string &option)
41
41
// Writes all missing QSettings with their default values
42
42
void OptionsModel::Init ()
43
43
{
44
+ resetSettings = false ;
44
45
QSettings settings;
45
46
46
47
// Ensure restart flag is unset on client startup
@@ -151,6 +152,7 @@ void OptionsModel::Reset()
151
152
152
153
// Remove all entries from our QSettings object
153
154
settings.clear ();
155
+ resetSettings = true ; // Needed in dash.cpp during shotdown to also remove the window positions
154
156
155
157
// default setting for OptionsModel::StartAtStartup - disabled
156
158
if (GUIUtil::GetStartOnSystemStartup ())
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ class OptionsModel : public QAbstractListModel
70
70
/* Restart flag helper */
71
71
void setRestartRequired (bool fRequired );
72
72
bool isRestartRequired ();
73
+ bool resetSettings;
73
74
74
75
private:
75
76
/* Qt-only settings */
You can’t perform that action at this time.
0 commit comments