qnetworkinterface.cpp: Rename "interface" variables to "iface" to fix a unity build

On Windows the "interface" is defined as "struct".

Pick-to: 6.8
Task-number:  QTBUG-122980
Change-Id: I1a80c9e40d59449bb3c3773679a95405ea39d630
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 23a4b586f7137a86028e731dbaf800b1ebcf738a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Nodir Temirkhodjaev 2025-03-25 13:07:32 +05:00 committed by Qt Cherry-pick Bot
parent e495e0ea28
commit 7dbda42554

View File

@ -29,8 +29,8 @@ static QList<QNetworkInterfacePrivate *> postProcess(QList<QNetworkInterfacePriv
// The math is:
// broadcast = IP | ~netmask
for (QNetworkInterfacePrivate *interface : list) {
for (QNetworkAddressEntry &address : interface->addressEntries) {
for (QNetworkInterfacePrivate *iface : list) {
for (QNetworkAddressEntry &address : iface->addressEntries) {
if (address.ip().protocol() != QAbstractSocket::IPv4Protocol)
continue;
@ -62,11 +62,11 @@ QSharedDataPointer<QNetworkInterfacePrivate> 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<QNetworkInterfacePrivate> QNetworkInterfaceManager::interface
QSharedDataPointer<QNetworkInterfacePrivate> 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;