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 <volker.hilsheimer@qt.io>
This commit is contained in:
Nodir Temirkhodjaev 2025-03-25 13:07:32 +05:00 committed by Volker Hilsheimer
parent 76bc2dd390
commit 23a4b586f7

View File

@ -29,8 +29,8 @@ static QList<QNetworkInterfacePrivate *> postProcess(QList<QNetworkInterfacePriv
// The math is: // The math is:
// broadcast = IP | ~netmask // broadcast = IP | ~netmask
for (QNetworkInterfacePrivate *interface : list) { for (QNetworkInterfacePrivate *iface : list) {
for (QNetworkAddressEntry &address : interface->addressEntries) { for (QNetworkAddressEntry &address : iface->addressEntries) {
if (address.ip().protocol() != QAbstractSocket::IPv4Protocol) if (address.ip().protocol() != QAbstractSocket::IPv4Protocol)
continue; continue;
@ -62,11 +62,11 @@ QSharedDataPointer<QNetworkInterfacePrivate> QNetworkInterfaceManager::interface
bool ok; bool ok;
uint index = name.toUInt(&ok); uint index = name.toUInt(&ok);
for (const auto &interface : interfaceList) { for (const auto &iface : interfaceList) {
if (ok && interface->index == int(index)) if (ok && iface->index == int(index))
return interface; return iface;
else if (interface->name == name) else if (iface->name == name)
return interface; return iface;
} }
return empty; return empty;
@ -75,9 +75,9 @@ QSharedDataPointer<QNetworkInterfacePrivate> QNetworkInterfaceManager::interface
QSharedDataPointer<QNetworkInterfacePrivate> QNetworkInterfaceManager::interfaceFromIndex(int index) QSharedDataPointer<QNetworkInterfacePrivate> QNetworkInterfaceManager::interfaceFromIndex(int index)
{ {
const auto interfaceList = allInterfaces(); const auto interfaceList = allInterfaces();
for (const auto &interface : interfaceList) { for (const auto &iface : interfaceList) {
if (interface->index == index) if (iface->index == index)
return interface; return iface;
} }
return empty; return empty;