diff options
author | Liang Qi <liang.qi@qt.io> | 2019-12-10 13:51:40 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-12-10 13:51:40 +0200 |
commit | 90210d5d9c4029057035019f144212922494ff0a (patch) | |
tree | 1aacefa57786964d47a200791280ae91c9b825da /src/corelib/kernel | |
parent | c69a2448ab129d88411a4778f2350dcf971dc623 (diff) | |
parent | 5231c26a82a7056f98d99643850754d4e1ebe417 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
tests/auto/network/kernel/qnetworkinterface/BLACKLIST
Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
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 6e27c9bf1f..f48419c934 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) { @@ -546,7 +546,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 &) { |