diff options
author | Robert Adam <dev@robert-adam.de> | 2020-04-20 09:51:21 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2020-04-20 09:51:21 +0300 |
commit | fa8e9b2fcbba412787d87b9591367bfb630ad4c5 (patch) | |
tree | d8ae75d0f315f7026d94d057dd7b60ce16c7504b /src/murmur/MurmurGRPCImpl.cpp | |
parent | 45e76ce49e74d6acb17786384f4c1e08306373fa (diff) |
src/murmur/MurmurGRPCImpl.cpp: Use QAtomicInteger::loadRelaxed() instead of QAtomicInteger::load() for Qt >= 5.14
Diffstat (limited to 'src/murmur/MurmurGRPCImpl.cpp')
-rw-r--r-- | src/murmur/MurmurGRPCImpl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/murmur/MurmurGRPCImpl.cpp b/src/murmur/MurmurGRPCImpl.cpp index d54fed54b..cb275062c 100644 --- a/src/murmur/MurmurGRPCImpl.cpp +++ b/src/murmur/MurmurGRPCImpl.cpp @@ -283,7 +283,12 @@ void ToRPC(const ::Server *srv, const ::User *u, ::MurmurRPC::User *ru) { ru->set_udp_ping_msecs(su->dUDPPingAvg); ru->set_tcp_ping_msecs(su->dTCPPingAvg); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + ru->set_tcp_only(su->aiUdpFlag.loadRelaxed() == 0); +#else + // Qt 5.14 introduced QAtomicInteger::loadRelaxed() which deprecates QAtomicInteger::load() ru->set_tcp_only(su->aiUdpFlag.load() == 0); +#endif ru->set_address(su->haAddress.toStdString()); } |