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