aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 09553a2587..f07e66bf04 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -122,11 +122,6 @@ void OptionsModel::Init()
// Only try to set -proxy, if user has enabled fUseProxy
if (settings.value("fUseProxy").toBool() && !SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()))
addOverriddenOption("-proxy");
- if (!settings.contains("nSocksVersion"))
- settings.setValue("nSocksVersion", 5);
- // Only try to set -socks, if user has enabled fUseProxy
- if (settings.value("fUseProxy").toBool() && !SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString()))
- addOverriddenOption("-socks");
// Display
if (!settings.contains("language"))
@@ -188,8 +183,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
return strlIpPort.at(1);
}
- case ProxySocksVersion:
- return settings.value("nSocksVersion", 5);
#ifdef ENABLE_WALLET
case Fee: {
@@ -284,13 +277,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
}
}
break;
- case ProxySocksVersion: {
- if (settings.value("nSocksVersion") != value) {
- settings.setValue("nSocksVersion", value.toInt());
- setRestartRequired(true);
- }
- }
- break;
#ifdef ENABLE_WALLET
case Fee: { // core option - can be changed on-the-fly
// Todo: Add is valid check and warn via message, if not
@@ -378,20 +364,16 @@ bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const
// GUI settings can be overridden with -proxy.
proxyType curProxy;
if (GetProxy(NET_IPV4, curProxy)) {
- if (curProxy.second == 5) {
- proxy.setType(QNetworkProxy::Socks5Proxy);
- proxy.setHostName(QString::fromStdString(curProxy.first.ToStringIP()));
- proxy.setPort(curProxy.first.GetPort());
+ proxy.setType(QNetworkProxy::Socks5Proxy);
+ proxy.setHostName(QString::fromStdString(curProxy.ToStringIP()));
+ proxy.setPort(curProxy.GetPort());
- return true;
- }
- else
- return false;
+ return true;
}
else
proxy.setType(QNetworkProxy::NoProxy);
- return true;
+ return false;
}
void OptionsModel::setRestartRequired(bool fRequired)