Remove direct bitcoin calls from qt/optionsdialog.cpp

This commit is contained in:
Russell Yanofsky 2017-04-17 16:43:47 -04:00 committed by John Newbery
parent 582daf6d22
commit 90d4640b7e
2 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,7 @@
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <interface/node.h>
#include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
#include <netbase.h>
#include <txdb.h> // for -dbcache defaults
@ -313,17 +314,17 @@ void OptionsDialog::updateDefaultProxyNets()
std::string strProxy;
QString strDefaultProxyGUI;
GetProxy(NET_IPV4, proxy);
model->node().getProxy(NET_IPV4, proxy);
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv4->setChecked(true) : ui->proxyReachIPv4->setChecked(false);
GetProxy(NET_IPV6, proxy);
model->node().getProxy(NET_IPV6, proxy);
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv6->setChecked(true) : ui->proxyReachIPv6->setChecked(false);
GetProxy(NET_TOR, proxy);
model->node().getProxy(NET_TOR, proxy);
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachTor->setChecked(true) : ui->proxyReachTor->setChecked(false);

View File

@ -79,6 +79,8 @@ public:
void setRestartRequired(bool fRequired);
bool isRestartRequired() const;
interface::Node& node() const { return m_node; }
private:
interface::Node& m_node;
/* Qt-only settings */