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/tests/TestSSLLocks | |
parent | c6a0984383c89d138c0945ff9e3dbd4a772bba7f (diff) |
Qt: Use QAtomicInteger::loadRelaxed() instead of QAtomicInteger::load()
for Qt 5.14 and higher
Diffstat (limited to 'src/tests/TestSSLLocks')
-rw-r--r-- | src/tests/TestSSLLocks/TestSSLLocks.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/TestSSLLocks/TestSSLLocks.cpp b/src/tests/TestSSLLocks/TestSSLLocks.cpp index 6d66fa2b1..68d8ec784 100644 --- a/src/tests/TestSSLLocks/TestSSLLocks.cpp +++ b/src/tests/TestSSLLocks/TestSSLLocks.cpp @@ -29,7 +29,12 @@ public: void run() { unsigned char buf[64]; +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + while (m_running->loadRelaxed() == 1) { +#else + // Qt 5.14 introduced QAtomicInteger::loadRelaxed() which deprecates QAtomicInteger::load() while (m_running->load() == 1) { +#endif for (int i = 0; i < 1024; i++) { if (m_seed) { RAND_seed(buf, sizeof(buf)); |