summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qfutex_p.h4
-rw-r--r--src/corelib/thread/qmutex.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
index 7bec4554b7..f287b752d7 100644
--- a/src/corelib/thread/qfutex_p.h
+++ b/src/corelib/thread/qfutex_p.h
@@ -81,7 +81,7 @@ QT_END_NAMESPACE
// if not defined in linux/futex.h
# define FUTEX_PRIVATE_FLAG 128 // added in v2.6.22
-# if QT_HAS_FEATURE(thread_sanitizer) || defined(__SANITIZE_THREAD__)
+# if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
# include <sanitizer/tsan_interface.h>
inline void _q_tsan_acquire(void *addr, void *addr2)
{
@@ -98,7 +98,7 @@ inline void _q_tsan_release(void *addr, void *addr2)
# else
inline void _q_tsan_acquire(void *, void *) {}
inline void _q_tsan_release(void *, void *) {}
-# endif // QT_HAS_FEATURE(thread_sanitizer) || defined(__SANITIZE_THREAD__)
+# endif // __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
QT_BEGIN_NAMESPACE
namespace QtLinuxFutex {
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index c693ff65d8..93c4bf23e8 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -44,7 +44,7 @@
#include <QtCore/qatomic.h>
#include <new>
-#if QT_HAS_INCLUDE(<chrono>)
+#if __has_include(<chrono>)
# include <chrono>
# include <limits>
#endif
@@ -147,7 +147,7 @@ public:
// Lockable concept
bool try_lock() QT_MUTEX_LOCK_NOEXCEPT { return tryLock(); }
-#if QT_HAS_INCLUDE(<chrono>) || defined(Q_CLANG_QDOC)
+#if __has_include(<chrono>) || defined(Q_CLANG_QDOC)
// TimedLockable concept
template <class Rep, class Period>
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
@@ -175,7 +175,7 @@ private:
friend class QRecursiveMutex;
friend class ::tst_QMutex;
-#if QT_HAS_INCLUDE(<chrono>)
+#if __has_include(<chrono>)
template<class Rep, class Period>
static int convertToMilliseconds(std::chrono::duration<Rep, Period> duration)
{
@@ -213,7 +213,7 @@ public:
using QMutex::tryLock;
using QMutex::unlock;
using QMutex::try_lock;
-#if QT_HAS_INCLUDE(<chrono>)
+#if __has_include(<chrono>)
using QMutex::try_lock_for;
using QMutex::try_lock_until;
#endif
@@ -295,7 +295,7 @@ public:
inline void unlock() noexcept {}
inline bool isRecursive() const noexcept { return true; }
-#if QT_HAS_INCLUDE(<chrono>)
+#if __has_include(<chrono>)
template <class Rep, class Period>
inline bool try_lock_for(std::chrono::duration<Rep, Period> duration) noexcept
{