Fix compile on older Qt than 5.11
This commit is contained in:
@@ -827,7 +827,11 @@ QString MacAddress() {
|
|||||||
!(interface.flags() & QNetworkInterface::IsUp) ||
|
!(interface.flags() & QNetworkInterface::IsUp) ||
|
||||||
!(interface.flags() & QNetworkInterface::IsRunning)
|
!(interface.flags() & QNetworkInterface::IsRunning)
|
||||||
) { continue; }
|
) { continue; }
|
||||||
if (ret.isEmpty() || interface.type() == QNetworkInterface::Ethernet || interface.type() == QNetworkInterface::Wifi) {
|
if (ret.isEmpty()
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||||
|
|| interface.type() == QNetworkInterface::Ethernet || interface.type() == QNetworkInterface::Wifi
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
ret = interface.hardwareAddress();
|
ret = interface.hardwareAddress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user