File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 16
16
#include " main.h" // For DEFAULT_SCRIPTCHECK_THREADS
17
17
#include " net.h"
18
18
#include " txdb.h" // for -dbcache defaults
19
+ #include " intro.h"
19
20
20
21
#ifdef ENABLE_WALLET
21
22
#include " wallet/wallet.h"
@@ -98,6 +99,9 @@ void OptionsModel::Init(bool resetSettings)
98
99
if (!SoftSetArg (" -par" , settings.value (" nThreadsScriptVerif" ).toString ().toStdString ()))
99
100
addOverriddenOption (" -par" );
100
101
102
+ if (!settings.contains (" strDataDir" ))
103
+ settings.setValue (" strDataDir" , Intro::getDefaultDataDirectory ());
104
+
101
105
// Wallet
102
106
#ifdef ENABLE_WALLET
103
107
if (!settings.contains (" bSpendZeroConfChange" ))
@@ -150,9 +154,16 @@ void OptionsModel::Reset()
150
154
{
151
155
QSettings settings;
152
156
157
+ // Save the strDataDir setting
158
+ QString dataDir = Intro::getDefaultDataDirectory ();
159
+ dataDir = settings.value (" strDataDir" , dataDir).toString ();
160
+
153
161
// Remove all entries from our QSettings object
154
162
settings.clear ();
155
163
164
+ // Set strDataDir
165
+ settings.setValue (" strDataDir" , dataDir);
166
+
156
167
// default setting for OptionsModel::StartAtStartup - disabled
157
168
if (GUIUtil::GetStartOnSystemStartup ())
158
169
GUIUtil::SetStartOnSystemStartup (false );
You can’t perform that action at this time.
0 commit comments