[Qt] misc PaymentServer changes (e.g. changes to eventFilter())

- make eventFilter() private and pass events on to QObject::eventFilter()
  instead of just returning false
- re-work paymentservertest.cpp to correctly handle the event test
  after the above change (rewrite test_main to allow usage of
  QCoreApplication:: in the tests)
- delete socket when we were unable to connect in ipcSendCommandLine()
- show a message to the user if we fail to start-up (instead of just a
  debug.log entry)
- misc small comment changes
This commit is contained in:
Philip Kaufmann
2013-11-14 19:21:16 +01:00
parent b4297c8fff
commit 4cf3411056
5 changed files with 35 additions and 19 deletions

View File

@@ -77,10 +77,6 @@ public:
// Return certificate store
static X509_STORE* getCertStore() { return certStore; }
// Constructor registers this on the parent QApplication to
// receive QEvent::FileOpen events
bool eventFilter(QObject *object, QEvent *event);
// OptionsModel is used for getting proxy settings and display unit
void setOptionsModel(OptionsModel *optionsModel);
@@ -111,6 +107,11 @@ private slots:
void reportSslErrors(QNetworkReply*, const QList<QSslError> &);
void handlePaymentACK(const QString& paymentACKMsg);
protected:
// Constructor registers this on the parent QApplication to
// receive QEvent::FileOpen and QEvent:Drop events
bool eventFilter(QObject *object, QEvent *event);
private:
static bool readPaymentRequest(const QString& filename, PaymentRequestPlus& request);
bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);