From 4a5f3c8b930d319ce2ecc802a0868164f18034db Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 1 Aug 2023 11:01:42 -0700 Subject: CMake: remove check for cxx11_future Everyone must have this by now. This test was 1193 ms of CMake time. Since this was a PUBLIC feature, I've left it around with a constant condition. Change-Id: Ifbf974a4d10745b099b1fffd177754538bbff245 Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale --- src/corelib/thread/qthread.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/corelib/thread/qthread.h') diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 40f363ee5a..32a0bb703e 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -9,10 +9,8 @@ #include // For QThread::create -#if QT_CONFIG(cxx11_future) -# include // for std::async -# include // for std::invoke; no guard needed as it's a C++98 header -#endif +#include // for std::async +#include // for std::invoke; no guard needed as it's a C++98 header // internal compiler error with mingw 8.1 #if defined(Q_CC_MSVC) && defined(Q_PROCESSOR_X86) #include @@ -70,10 +68,8 @@ public: bool event(QEvent *event) override; int loopLevel() const; -#if QT_CONFIG(cxx11_future) || defined(Q_QDOC) template [[nodiscard]] static QThread *create(Function &&f, Args &&... args); -#endif public Q_SLOTS: void start(Priority = InheritPriority); @@ -112,16 +108,13 @@ private: Q_DECLARE_PRIVATE(QThread) friend class QEventLoopLocker; -#if QT_CONFIG(cxx11_future) [[nodiscard]] static QThread *createThreadImpl(std::future &&future); -#endif static Qt::HANDLE currentThreadIdImpl() noexcept Q_DECL_PURE_FUNCTION; friend class QCoreApplication; friend class QThreadData; }; -#if QT_CONFIG(cxx11_future) template QThread *QThread::create(Function &&f, Args &&... args) { @@ -136,7 +129,6 @@ QThread *QThread::create(Function &&f, Args &&... args) std::move(threadFunction), std::forward(args)...)); } -#endif // QT_CONFIG(cxx11_future) /* On architectures and platforms we know, interpret the thread control -- cgit v1.2.3