diff options
-rw-r--r-- | tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp index b54f133..60631d2 100644 --- a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp +++ b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp @@ -80,11 +80,12 @@ private slots: void tst_QPacketProtocol::init() { m_server = new QTcpServer(this); - QVERIFY(m_server->listen()); - + m_serverConn = 0; + QVERIFY(m_server->listen(QHostAddress("127.0.0.1"))); + m_client = new QTcpSocket(this); m_client->connectToHost(m_server->serverAddress(), m_server->serverPort()); - + QVERIFY(m_client->waitForConnected()); QVERIFY(m_server->waitForNewConnection()); m_serverConn = m_server->nextPendingConnection(); |