1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-17 19:18:36 +01:00

Fix compile on older Qt than 5.11

This commit is contained in:
Jonas Kvinge 2019-09-22 22:43:54 +02:00
parent cec2745dc0
commit 10c11f2c3d

View File

@ -827,7 +827,11 @@ QString MacAddress() {
!(interface.flags() & QNetworkInterface::IsUp) ||
!(interface.flags() & QNetworkInterface::IsRunning)
) { 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();
}
}