Skip to content

Commit 90d4640

Browse files
ryanofskyjnewbery
authored andcommitted
Remove direct bitcoin calls from qt/optionsdialog.cpp
1 parent 582daf6 commit 90d4640

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/qt/optionsdialog.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <qt/guiutil.h>
1414
#include <qt/optionsmodel.h>
1515

16+
#include <interface/node.h>
1617
#include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
1718
#include <netbase.h>
1819
#include <txdb.h> // for -dbcache defaults
@@ -313,17 +314,17 @@ void OptionsDialog::updateDefaultProxyNets()
313314
std::string strProxy;
314315
QString strDefaultProxyGUI;
315316

316-
GetProxy(NET_IPV4, proxy);
317+
model->node().getProxy(NET_IPV4, proxy);
317318
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
318319
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
319320
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv4->setChecked(true) : ui->proxyReachIPv4->setChecked(false);
320321

321-
GetProxy(NET_IPV6, proxy);
322+
model->node().getProxy(NET_IPV6, proxy);
322323
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
323324
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
324325
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv6->setChecked(true) : ui->proxyReachIPv6->setChecked(false);
325326

326-
GetProxy(NET_TOR, proxy);
327+
model->node().getProxy(NET_TOR, proxy);
327328
strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
328329
strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
329330
(strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachTor->setChecked(true) : ui->proxyReachTor->setChecked(false);

src/qt/optionsmodel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ class OptionsModel : public QAbstractListModel
7979
void setRestartRequired(bool fRequired);
8080
bool isRestartRequired() const;
8181

82+
interface::Node& node() const { return m_node; }
83+
8284
private:
8385
interface::Node& m_node;
8486
/* Qt-only settings */

0 commit comments

Comments
 (0)