tst_QTcpServer::clientServerLoop fix for Windows Xp

When we do not have dual stack the listen on QHostAddress::Any will
result in a serverAddress that is AnyIPv4.

Change-Id: I3c2c21c9412cd46a57e3ed7ce1c1bd2ef42d4bd9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
Martin Petersson 2012-07-03 14:20:37 +02:00 committed by Qt by Nokia
parent 7f32418f26
commit 5c8d5b3dee

View File

@ -225,7 +225,7 @@ void tst_QTcpServer::clientServerLoop()
QTcpSocket client; QTcpSocket client;
QHostAddress serverAddress = QHostAddress::LocalHost; QHostAddress serverAddress = QHostAddress::LocalHost;
if (!(server.serverAddress() == QHostAddress::Any) && !(server.serverAddress() == QHostAddress::AnyIPv6)) if (!(server.serverAddress() == QHostAddress::Any) && !(server.serverAddress() == QHostAddress::AnyIPv6) && !(server.serverAddress() == QHostAddress::AnyIPv4))
serverAddress = server.serverAddress(); serverAddress = server.serverAddress();
client.connectToHost(serverAddress, server.serverPort()); client.connectToHost(serverAddress, server.serverPort());