| 472 | } |
| 473 | |
| 474 | bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const |
| 475 | { |
| 476 | // Directly query current base proxy, because |
| 477 | // GUI settings can be overridden with -proxy. |
| 478 | proxyType curProxy; |
| 479 | if (m_node.getProxy(NET_IPV4, curProxy)) { |
| 480 | proxy.setType(QNetworkProxy::Socks5Proxy); |
| 481 | proxy.setHostName(QString::fromStdString(curProxy.proxy.ToStringIP())); |
| 482 | proxy.setPort(curProxy.proxy.GetPort()); |
| 483 | |
| 484 | return true; |
| 485 | } |
| 486 | else |
| 487 | proxy.setType(QNetworkProxy::NoProxy); |
| 488 | |
| 489 | return false; |
| 490 | } |
| 491 | |
| 492 | void OptionsModel::setRestartRequired(bool fRequired) |
| 493 | { |
no test coverage detected