I did some more debugging on this bug report.
The problem is, that the code in the testcase is wrong.
One always needs to connect SIGNALs to SLOTS.
In the original code for example it was tried to connect the closed signal to a 
closed slot, although an
EchoServer::closed() slot does not exist (but a closed signal which isn't used).

Attached patch fixes everything on the hppa architecture.
I'm sure that it will fix  powerpc and ppc64el architectures too.

If it's correct, maybe can push it upstream to 
https://bugreports.qt.io/browse/QTBUG-43804 ?

Helge
diff -up ./tests/auto/qwebsocket/tst_qwebsocket.cpp.org ./tests/auto/qwebsocket/tst_qwebsocket.cpp
--- ./tests/auto/qwebsocket/tst_qwebsocket.cpp.org	2015-01-24 21:28:49.069050151 +0100
+++ ./tests/auto/qwebsocket/tst_qwebsocket.cpp	2015-01-24 21:30:18.937237039 +0100
@@ -58,9 +58,6 @@ public:
     QHostAddress hostAddress() const { return m_pWebSocketServer->serverAddress(); }
     quint16 port() const { return m_pWebSocketServer->serverPort(); }
 
-Q_SIGNALS:
-    void closed();
-
 private Q_SLOTS:
     void onNewConnection();
     void processTextMessage(QString message);
@@ -79,9 +76,8 @@ EchoServer::EchoServer(QObject *parent)
     m_clients()
 {
     if (m_pWebSocketServer->listen()) {
-        connect(m_pWebSocketServer, &QWebSocketServer::newConnection,
-                this, &EchoServer::onNewConnection);
-        connect(m_pWebSocketServer, &QWebSocketServer::closed, this, &EchoServer::closed);
+        connect(m_pWebSocketServer, SIGNAL(newConnection()),
+                this, SLOT(onNewConnection()));
     }
 }
 
@@ -95,9 +91,9 @@ void EchoServer::onNewConnection()
 {
     QWebSocket *pSocket = m_pWebSocketServer->nextPendingConnection();
 
-    connect(pSocket, &QWebSocket::textMessageReceived, this, &EchoServer::processTextMessage);
-    connect(pSocket, &QWebSocket::binaryMessageReceived, this, &EchoServer::processBinaryMessage);
-    connect(pSocket, &QWebSocket::disconnected, this, &EchoServer::socketDisconnected);
+    connect(pSocket, SIGNAL(textMessageReceived(QString)), this, SLOT(processTextMessage(QString)));
+    connect(pSocket, SIGNAL(binaryMessageReceived(QByteArray)), this, SLOT(processBinaryMessage(QByteArray)));
+    connect(pSocket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
 
     m_clients << pSocket;
 }

Reply via email to