konvergo-error.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. diff --git a/external/qhttpserver/src/qhttpserver.cpp b/external/qhttpserver/src/qhttpserver.cpp
  2. index 07e4a85..507645d 100755
  3. --- a/external/qhttpserver/src/qhttpserver.cpp
  4. +++ b/external/qhttpserver/src/qhttpserver.cpp
  5. @@ -115,6 +115,7 @@ bool QHttpServer::listen(const QHostAddress &address, quint16 port)
  6. if (couldBindToPort) {
  7. connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection()));
  8. } else {
  9. + m_errorString = m_tcpServer->errorString();
  10. delete m_tcpServer;
  11. m_tcpServer = NULL;
  12. }
  13. @@ -126,6 +127,11 @@ bool QHttpServer::listen(quint16 port)
  14. return listen(QHostAddress::Any, port);
  15. }
  16. +QString QHttpServer::errorString() const
  17. +{
  18. + return m_errorString;
  19. +}
  20. +
  21. void QHttpServer::close()
  22. {
  23. if (m_tcpServer)
  24. diff --git a/external/qhttpserver/src/qhttpserver.h b/external/qhttpserver/src/qhttpserver.h
  25. index a3cb74b..4adb391 100755
  26. --- a/external/qhttpserver/src/qhttpserver.h
  27. +++ b/external/qhttpserver/src/qhttpserver.h
  28. @@ -79,6 +79,9 @@ public:
  29. @sa listen(const QHostAddress&, quint16) */
  30. bool listen(quint16 port);
  31. + /// Return the last error encountered.
  32. + QString errorString() const;
  33. +
  34. /// Stop the server and listening for new connections.
  35. void close();
  36. signals:
  37. @@ -94,6 +97,7 @@ private slots:
  38. private:
  39. QTcpServer *m_tcpServer;
  40. + QString m_errorString;
  41. };
  42. #endif