From 5c8d5b3deea387a3cb237c121e3d4ee4f0db5053 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Tue, 3 Jul 2012 14:20:37 +0200 Subject: [PATCH] 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 --- tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index d37f0b7..fe9613a 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -225,7 +225,7 @@ void tst_QTcpServer::clientServerLoop() QTcpSocket client; 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(); client.connectToHost(serverAddress, server.serverPort()); -- 2.7.4