diff options
author | Robert Adam <dev@robert-adam.de> | 2020-02-27 14:00:49 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2020-02-27 17:31:35 +0300 |
commit | 59b7013539ba2b4e8ef016382a81dce14b9ac767 (patch) | |
tree | f5d3141a3a85c0837ef85c959e1a86bf0c91ae49 /src/murmur/MurmurIce.cpp | |
parent | c6a0984383c89d138c0945ff9e3dbd4a772bba7f (diff) |
Qt: Use QAtomicInteger::loadRelaxed() instead of QAtomicInteger::load()
for Qt 5.14 and higher
Diffstat (limited to 'src/murmur/MurmurIce.cpp')
-rw-r--r-- | src/murmur/MurmurIce.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/murmur/MurmurIce.cpp b/src/murmur/MurmurIce.cpp index 27a424cd9..07c43e6b7 100644 --- a/src/murmur/MurmurIce.cpp +++ b/src/murmur/MurmurIce.cpp @@ -123,7 +123,12 @@ static void userToUser(const ::User *p, Murmur::User &mp) { mp.udpPing = u->dUDPPingAvg; mp.tcpPing = u->dTCPPingAvg; +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + mp.tcponly = u->aiUdpFlag.loadRelaxed() == 0; +#else + // Qt 5.14 introduced QAtomicInteger::loadRelaxed() which deprecates QAtomicInteger::load() mp.tcponly = u->aiUdpFlag.load() == 0; +#endif ::Murmur::NetAddress addr(16, 0); const Q_IPV6ADDR &a = u->haAddress.qip6; |