|
|
|
@ -110,6 +110,11 @@ void OptionsModel::Init()
@@ -110,6 +110,11 @@ void OptionsModel::Init()
|
|
|
|
|
if (!SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool())) |
|
|
|
|
addOverriddenOption("-upnp"); |
|
|
|
|
|
|
|
|
|
if (!settings.contains("fListen")) |
|
|
|
|
settings.setValue("fListen", DEFAULT_LISTEN); |
|
|
|
|
if (!SoftSetBoolArg("-listen", settings.value("fListen").toBool())) |
|
|
|
|
addOverriddenOption("-listen"); |
|
|
|
|
|
|
|
|
|
if (!settings.contains("fUseProxy")) |
|
|
|
|
settings.setValue("fUseProxy", false); |
|
|
|
|
if (!settings.contains("addrProxy")) |
|
|
|
@ -214,6 +219,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
@@ -214,6 +219,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
|
|
|
|
return settings.value("nDatabaseCache"); |
|
|
|
|
case ThreadsScriptVerif: |
|
|
|
|
return settings.value("nThreadsScriptVerif"); |
|
|
|
|
case Listen: |
|
|
|
|
return settings.value("fListen"); |
|
|
|
|
default: |
|
|
|
|
return QVariant(); |
|
|
|
|
} |
|
|
|
@ -339,6 +346,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
@@ -339,6 +346,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
|
|
|
|
setRestartRequired(true); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case Listen: |
|
|
|
|
if (settings.value("fListen") != value) { |
|
|
|
|
settings.setValue("fListen", value); |
|
|
|
|
setRestartRequired(true); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|