Fix reported build failure with VS2010 on windows 8.1.

Task-number: QTBUG-44321
Change-Id: I885e3dab52193f7dfd245345fde53f6bb3420430
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
This commit is contained in:
Richard J. Moore 2015-02-07 15:40:31 +00:00
parent b4491c358d
commit 86b000ea1b

View File

@ -491,11 +491,11 @@ void tst_QTcpSocket::bind_data()
// iterate all interfaces, add all addresses on them as test data // iterate all interfaces, add all addresses on them as test data
QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces(); QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
foreach (const QNetworkInterface &interface, interfaces) { foreach (const QNetworkInterface &netinterface, interfaces) {
if (!interface.isValid()) if (!netinterface.isValid())
continue; continue;
foreach (const QNetworkAddressEntry &entry, interface.addressEntries()) { foreach (const QNetworkAddressEntry &entry, netinterface.addressEntries()) {
if (entry.ip().isInSubnet(QHostAddress::parseSubnet("fe80::/10")) if (entry.ip().isInSubnet(QHostAddress::parseSubnet("fe80::/10"))
|| entry.ip().isInSubnet(QHostAddress::parseSubnet("169.254/16"))) || entry.ip().isInSubnet(QHostAddress::parseSubnet("169.254/16")))
continue; // link-local bind will fail, at least on Linux, so skip it. continue; // link-local bind will fail, at least on Linux, so skip it.