|
|
@ -16,6 +16,7 @@ |
|
|
|
#include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS |
|
|
|
#include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS |
|
|
|
#include "net.h" |
|
|
|
#include "net.h" |
|
|
|
#include "txdb.h" // for -dbcache defaults |
|
|
|
#include "txdb.h" // for -dbcache defaults |
|
|
|
|
|
|
|
#include "intro.h" |
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#include "wallet/wallet.h" |
|
|
|
#include "wallet/wallet.h" |
|
|
@ -98,6 +99,9 @@ void OptionsModel::Init(bool resetSettings) |
|
|
|
if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString())) |
|
|
|
if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString())) |
|
|
|
addOverriddenOption("-par"); |
|
|
|
addOverriddenOption("-par"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!settings.contains("strDataDir")) |
|
|
|
|
|
|
|
settings.setValue("strDataDir", Intro::getDefaultDataDirectory()); |
|
|
|
|
|
|
|
|
|
|
|
// Wallet
|
|
|
|
// Wallet
|
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
if (!settings.contains("bSpendZeroConfChange")) |
|
|
|
if (!settings.contains("bSpendZeroConfChange")) |
|
|
@ -150,9 +154,19 @@ void OptionsModel::Reset() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QSettings settings; |
|
|
|
QSettings settings; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Save the strDataDir setting
|
|
|
|
|
|
|
|
QString dataDir = Intro::getDefaultDataDirectory(); |
|
|
|
|
|
|
|
dataDir = settings.value("strDataDir", dataDir).toString(); |
|
|
|
|
|
|
|
|
|
|
|
// Remove all entries from our QSettings object
|
|
|
|
// Remove all entries from our QSettings object
|
|
|
|
settings.clear(); |
|
|
|
settings.clear(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set strDataDir
|
|
|
|
|
|
|
|
settings.setValue("strDataDir", dataDir); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set that this was reset
|
|
|
|
|
|
|
|
settings.setValue("fReset", true); |
|
|
|
|
|
|
|
|
|
|
|
// default setting for OptionsModel::StartAtStartup - disabled
|
|
|
|
// default setting for OptionsModel::StartAtStartup - disabled
|
|
|
|
if (GUIUtil::GetStartOnSystemStartup()) |
|
|
|
if (GUIUtil::GetStartOnSystemStartup()) |
|
|
|
GUIUtil::SetStartOnSystemStartup(false); |
|
|
|
GUIUtil::SetStartOnSystemStartup(false); |
|
|
|