mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-18 19:50:38 +01:00
Change conflicting variable
This commit is contained in:
parent
3d3d641e1c
commit
34f071ed1d
@ -820,19 +820,19 @@ QString MacAddress() {
|
||||
|
||||
QString ret;
|
||||
|
||||
for (QNetworkInterface &interface : QNetworkInterface::allInterfaces()) {
|
||||
for (QNetworkInterface &netif : QNetworkInterface::allInterfaces()) {
|
||||
if (
|
||||
(interface.hardwareAddress() == "00:00:00:00:00:00") ||
|
||||
(interface.flags() & QNetworkInterface::IsLoopBack) ||
|
||||
!(interface.flags() & QNetworkInterface::IsUp) ||
|
||||
!(interface.flags() & QNetworkInterface::IsRunning)
|
||||
(netif.hardwareAddress() == "00:00:00:00:00:00") ||
|
||||
(netif.flags() & QNetworkInterface::IsLoopBack) ||
|
||||
!(netif.flags() & QNetworkInterface::IsUp) ||
|
||||
!(netif.flags() & QNetworkInterface::IsRunning)
|
||||
) { continue; }
|
||||
if (ret.isEmpty()
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||
|| interface.type() == QNetworkInterface::Ethernet || interface.type() == QNetworkInterface::Wifi
|
||||
|| netif.type() == QNetworkInterface::Ethernet || netif.type() == QNetworkInterface::Wifi
|
||||
#endif
|
||||
) {
|
||||
ret = interface.hardwareAddress();
|
||||
ret = netif.hardwareAddress();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user