summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2015-01-26 09:18:26 +0300
committerLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>2015-01-26 20:39:33 +0100
commit2d4c382f0133da0b56634b96e96e5c0f7ad92a2f (patch)
treeb872a8fc34d1acffc7f32938bac50f7ad6a1ba4d /tests
parentcb69a079ed323e3b524e3537b5b6582fd11495a2 (diff)
downloadqtwebsockets-2d4c382f0133da0b56634b96e96e5c0f7ad92a2f.tar.gz
Use old-style SIGNAL and SLOT macros in tst_qwebsocket.cpp
Without that, this test is failing on some architectures. Task-number: QTBUG-43804 Done-with: Helge Deller <deller@gmx.de> Change-Id: I7d275ca6d0baa70e504bbb4a31c65c2ed65d2118 Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qwebsocket/tst_qwebsocket.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/auto/qwebsocket/tst_qwebsocket.cpp b/tests/auto/qwebsocket/tst_qwebsocket.cpp
index 0e04ce1..29ba7a3 100644
--- a/tests/auto/qwebsocket/tst_qwebsocket.cpp
+++ b/tests/auto/qwebsocket/tst_qwebsocket.cpp
@@ -50,9 +50,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);
@@ -71,9 +68,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()));
}
}
@@ -87,9 +83,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;
}