Changeset View
Changeset View
Standalone View
Standalone View
src/qt/paymentserver.cpp
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | for (const QString &r : savedPaymentRequests) { | ||||
socket = nullptr; | socket = nullptr; | ||||
fResult = true; | fResult = true; | ||||
} | } | ||||
return fResult; | return fResult; | ||||
} | } | ||||
PaymentServer::PaymentServer(QObject *parent, bool startLocalServer) | PaymentServer::PaymentServer(QObject *parent, bool startLocalServer) | ||||
: QObject(parent), saveURIs(true), uriServer(0), optionsModel(0) | : QObject(parent), saveURIs(true), uriServer(nullptr), optionsModel(nullptr) | ||||
// clang-format off | // clang-format off | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
,netManager(0) | ,netManager(nullptr) | ||||
#endif | #endif | ||||
// clang-format on | // clang-format on | ||||
{ | { | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
// Verify that the version of the library that we linked against is | // Verify that the version of the library that we linked against is | ||||
// compatible with the version of the headers we compiled against. | // compatible with the version of the headers we compiled against. | ||||
GOOGLE_PROTOBUF_VERIFY_VERSION; | GOOGLE_PROTOBUF_VERIFY_VERSION; | ||||
#endif | #endif | ||||
Show All 11 Lines | #endif | ||||
QLocalServer::removeServer(name); | QLocalServer::removeServer(name); | ||||
if (startLocalServer) { | if (startLocalServer) { | ||||
uriServer = new QLocalServer(this); | uriServer = new QLocalServer(this); | ||||
if (!uriServer->listen(name)) { | if (!uriServer->listen(name)) { | ||||
// constructor is called early in init, so don't use "Q_EMIT | // constructor is called early in init, so don't use "Q_EMIT | ||||
// message()" here | // message()" here | ||||
QMessageBox::critical(0, tr("Payment request error"), | QMessageBox::critical(nullptr, tr("Payment request error"), | ||||
tr("Cannot start click-to-pay handler")); | tr("Cannot start click-to-pay handler")); | ||||
} else { | } else { | ||||
connect(uriServer, &QLocalServer::newConnection, this, | connect(uriServer, &QLocalServer::newConnection, this, | ||||
&PaymentServer::handleURIConnection); | &PaymentServer::handleURIConnection); | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
connect(this, &PaymentServer::receivedPaymentACK, this, | connect(this, &PaymentServer::receivedPaymentACK, this, | ||||
&PaymentServer::handlePaymentACK); | &PaymentServer::handlePaymentACK); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 646 Lines • Show Last 20 Lines |