diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-11 07:00:34 -0800 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-11 07:00:34 -0800 |
commit | a6aa179699aa4e885a7d93cd28a8af012cd5df2b (patch) | |
tree | 7b713be8a3ac78b4df6c65d2554b199b1fd84f46 /src | |
parent | 2b8c4410c1b6e806c8a4a72c33b83c51af19026d (diff) | |
parent | 7634e0d8de4aac80a3a84dd2438f24f98670d44d (diff) |
Merge pull request #3187 from Diapolo/netManager
[Qt] paymentserver: start netManager in uiReady()
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoin.cpp | 1 | ||||
-rw-r--r-- | src/qt/paymentserver.cpp | 2 | ||||
-rw-r--r-- | src/qt/paymentserver.h | 6 | ||||
-rw-r--r-- | src/qt/test/paymentservertests.cpp | 1 |
4 files changed, 4 insertions, 6 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 5eb0cfed37..54f96f4426 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -308,7 +308,6 @@ int main(int argc, char *argv[]) PaymentServer::LoadRootCAs(); paymentServer->setOptionsModel(&optionsModel); - paymentServer->initNetManager(); if (splashref) splash.finish(&window); diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index cb6291c35d..34da0f90ec 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -341,7 +341,7 @@ void PaymentServer::initNetManager() void PaymentServer::uiReady() { - assert(netManager != NULL); // Must call initNetManager before uiReady() + initNetManager(); saveURIs = false; foreach (const QString& s, savedPaymentRequests) diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index febcbad628..50f077f3bc 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -77,9 +77,6 @@ public: // Return certificate store static X509_STORE* getCertStore() { return certStore; } - // Setup networking - void initNetManager(); - // Constructor registers this on the parent QApplication to // receive QEvent::FileOpen events bool eventFilter(QObject *object, QEvent *event); @@ -119,6 +116,9 @@ private: bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient); void fetchRequest(const QUrl& url); + // Setup networking + void initNetManager(); + bool saveURIs; // true during startup QLocalServer* uriServer; diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp index f7d26fb919..b8f2cc65cb 100644 --- a/src/qt/test/paymentservertests.cpp +++ b/src/qt/test/paymentservertests.cpp @@ -60,7 +60,6 @@ void PaymentServerTests::paymentServerTests() X509_STORE_add_cert(caStore, parse_b64der_cert(caCert_BASE64)); PaymentServer::LoadRootCAs(caStore); server->setOptionsModel(&optionsModel); - server->initNetManager(); server->uiReady(); // Now feed PaymentRequests to server, and observe signals it produces: |