diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-10-25 11:33:59 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-10-25 11:33:59 -0700 |
commit | e74d0ab6752407d97c0586b1ba9bbaaad5e2e5f6 (patch) | |
tree | 0421e5cabda3a13e9ed4ab47ad580d181c169df7 /src/qt | |
parent | 66444558a551e72c25f6b8f82b8572d07835326b (diff) | |
parent | 5e5c102f2f901a19fda6ff877ab4195a88e4b703 (diff) |
Merge pull request #1899 from Diapolo/proxy_optionsmodel
make optionsmodel query real proxy state for ::data()
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/optionsmodel.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 1b2f18eab3..1075ce1e6c 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -142,8 +142,10 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const return settings.value("fUseUPnP", GetBoolArg("-upnp", true)); case MinimizeOnClose: return QVariant(fMinimizeOnClose); - case ProxyUse: - return settings.value("fUseProxy", false); + case ProxyUse: { + proxyType proxy; + return QVariant(GetProxy(NET_IPV4, proxy)); + } case ProxyIP: { proxyType proxy; if (GetProxy(NET_IPV4, proxy)) @@ -158,8 +160,13 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const else return QVariant(9050); } - case ProxySocksVersion: - return settings.value("nSocksVersion", 5); + case ProxySocksVersion: { + proxyType proxy; + if (GetProxy(NET_IPV4, proxy)) + return QVariant(proxy.second); + else + return QVariant(5); + } case Fee: return QVariant(nTransactionFee); case DisplayUnit: @@ -203,7 +210,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in break; case ProxyUse: settings.setValue("fUseProxy", value.toBool()); - ApplyProxySettings(); + successful = ApplyProxySettings(); break; case ProxyIP: { proxyType proxy; |