| 540 | } |
| 541 | |
| 542 | bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const |
| 543 | { |
| 544 | // Directly query current base proxy, because |
| 545 | // GUI settings can be overridden with -proxy. |
| 546 | proxyType curProxy; |
| 547 | if (GetProxy(NET_IPV4, curProxy)) { |
| 548 | proxy.setType(QNetworkProxy::Socks5Proxy); |
| 549 | proxy.setHostName(QString::fromStdString(curProxy.ToStringIP())); |
| 550 | proxy.setPort(curProxy.GetPort()); |
| 551 | |
| 552 | return true; |
| 553 | } else |
| 554 | proxy.setType(QNetworkProxy::NoProxy); |
| 555 | |
| 556 | return false; |
| 557 | } |
| 558 | |
| 559 | void OptionsModel::setRestartRequired(bool fRequired) |
| 560 | { |
no test coverage detected