summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-08 23:49:05 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-08 23:49:05 (GMT)
commit1feb1f131f0b0f1c782f5c82f2fe231f6c043553 (patch)
tree5e5177545a72b937db9a65860d6662db9a8281c6 /tests
parent1ab17b479a41559c74c86916492bb812c0b9e74e (diff)
downloadQt-1feb1f131f0b0f1c782f5c82f2fe231f6c043553.zip
Qt-1feb1f131f0b0f1c782f5c82f2fe231f6c043553.tar.gz
Qt-1feb1f131f0b0f1c782f5c82f2fe231f6c043553.tar.bz2
Connect to localhost instead of QHostAddress::Any. Fixes test on Windows.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp7
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();