diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qdeadlinetimer.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qtimer.h | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/kernel/qdeadlinetimer.h b/src/corelib/kernel/qdeadlinetimer.h index 9dd92481d2..99e09eb31f 100644 --- a/src/corelib/kernel/qdeadlinetimer.h +++ b/src/corelib/kernel/qdeadlinetimer.h @@ -52,7 +52,7 @@ #include <limits> -#if QT_HAS_INCLUDE(<chrono>) +#if __has_include(<chrono>) # include <chrono> #endif @@ -120,7 +120,7 @@ public: QDeadlineTimer &operator-=(qint64 msecs) { *this = *this + (-msecs); return *this; } -#if QT_HAS_INCLUDE(<chrono>) || defined(Q_CLANG_QDOC) +#if __has_include(<chrono>) || defined(Q_CLANG_QDOC) template <class Clock, class Duration> QDeadlineTimer(std::chrono::time_point<Clock, Duration> deadline_, Qt::TimerType type_ = Qt::CoarseTimer) : t2(0) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 540b8b32c1..f5d7c22e3a 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -55,7 +55,7 @@ #include <QtCore/qobject_impl.h> -#if QT_HAS_INCLUDE(<chrono>) +#if __has_include(<chrono>) # include <chrono> #endif @@ -160,7 +160,7 @@ public: void moveToThread(QThread *thread); int startTimer(int interval, Qt::TimerType timerType = Qt::CoarseTimer); -#if QT_HAS_INCLUDE(<chrono>) +#if __has_include(<chrono>) Q_ALWAYS_INLINE int startTimer(std::chrono::milliseconds time, Qt::TimerType timerType = Qt::CoarseTimer) { diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index eb7185c12d..6bbfd741d9 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -47,7 +47,7 @@ #include <QtCore/qbasictimer.h> // conceptual inheritance #include <QtCore/qobject.h> -#if QT_HAS_INCLUDE(<chrono>) +#if __has_include(<chrono>) # include <chrono> #endif @@ -177,7 +177,7 @@ Q_SIGNALS: void timeout(QPrivateSignal); public: -#if QT_HAS_INCLUDE(<chrono>) || defined(Q_QDOC) +#if __has_include(<chrono>) || defined(Q_QDOC) void setInterval(std::chrono::milliseconds value) { setInterval(int(value.count())); @@ -223,7 +223,7 @@ private: static void singleShotImpl(int msec, Qt::TimerType timerType, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj); -#if QT_HAS_INCLUDE(<chrono>) +#if __has_include(<chrono>) static Qt::TimerType defaultTypeFor(std::chrono::milliseconds interval) { return defaultTypeFor(int(interval.count())); } diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index e7d3d9c835..a4957472ec 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -53,7 +53,7 @@ #include <QtCore/qbytearraylist.h> #endif -#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L +#if __has_include(<variant>) && __cplusplus >= 201703L #include <variant> #elif defined(Q_CLANG_QDOC) namespace std { template<typename...> struct variant; } @@ -370,7 +370,7 @@ class Q_CORE_EXPORT QVariant static inline QVariant fromValue(const T &value) { return QVariant(qMetaTypeId<T>(), &value, QTypeInfo<T>::isPointer); } -#if (QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L) || defined(Q_CLANG_QDOC) +#if (__has_include(<variant>) && __cplusplus >= 201703L) || defined(Q_CLANG_QDOC) template<typename... Types> static inline QVariant fromStdVariant(const std::variant<Types...> &value) { @@ -544,7 +544,7 @@ inline QVariant QVariant::fromValue(const QVariant &value) return value; } -#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L +#if __has_include(<variant>) && __cplusplus >= 201703L template<> inline QVariant QVariant::fromValue(const std::monostate &) { |