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