| 350 | } |
| 351 | |
| 352 | void PaymentServer::initNetManager() |
| 353 | { |
| 354 | if (!optionsModel) |
| 355 | return; |
| 356 | delete netManager; |
| 357 | |
| 358 | // netManager is used to fetch paymentrequests given in bitcoin: URIs |
| 359 | netManager = new QNetworkAccessManager(this); |
| 360 | |
| 361 | QNetworkProxy proxy; |
| 362 | |
| 363 | // Query active SOCKS5 proxy |
| 364 | if (optionsModel->getProxySettings(proxy)) { |
| 365 | netManager->setProxy(proxy); |
| 366 | |
| 367 | qDebug() << "PaymentServer::initNetManager: Using SOCKS5 proxy" << proxy.hostName() << ":" << proxy.port(); |
| 368 | } |
| 369 | else |
| 370 | qDebug() << "PaymentServer::initNetManager: No active proxy server found."; |
| 371 | |
| 372 | connect(netManager, SIGNAL(finished(QNetworkReply*)), |
| 373 | this, SLOT(netRequestFinished(QNetworkReply*))); |
| 374 | connect(netManager, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError> &)), |
| 375 | this, SLOT(reportSslErrors(QNetworkReply*, const QList<QSslError> &))); |
| 376 | } |
| 377 | |
| 378 | void PaymentServer::uiReady() |
| 379 | { |
nothing calls this directly
no test coverage detected