From 23a4b586f7137a86028e731dbaf800b1ebcf738a Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Tue, 25 Mar 2025 13:07:32 +0500 Subject: [PATCH] qnetworkinterface.cpp: Rename "interface" variables to "iface" to fix a unity build On Windows the "interface" is defined as "struct". Pick-to: 6.9 6.8 Task-number: QTBUG-122980 Change-Id: I1a80c9e40d59449bb3c3773679a95405ea39d630 Reviewed-by: Volker Hilsheimer --- src/network/kernel/qnetworkinterface.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index fea6d4451b9..f2d5ccf0960 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -29,8 +29,8 @@ static QList postProcess(QListaddressEntries) { + for (QNetworkInterfacePrivate *iface : list) { + for (QNetworkAddressEntry &address : iface->addressEntries) { if (address.ip().protocol() != QAbstractSocket::IPv4Protocol) continue; @@ -62,11 +62,11 @@ QSharedDataPointer QNetworkInterfaceManager::interface bool ok; uint index = name.toUInt(&ok); - for (const auto &interface : interfaceList) { - if (ok && interface->index == int(index)) - return interface; - else if (interface->name == name) - return interface; + for (const auto &iface : interfaceList) { + if (ok && iface->index == int(index)) + return iface; + else if (iface->name == name) + return iface; } return empty; @@ -75,9 +75,9 @@ QSharedDataPointer QNetworkInterfaceManager::interface QSharedDataPointer QNetworkInterfaceManager::interfaceFromIndex(int index) { const auto interfaceList = allInterfaces(); - for (const auto &interface : interfaceList) { - if (interface->index == index) - return interface; + for (const auto &iface : interfaceList) { + if (iface->index == index) + return iface; } return empty;