diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-01 11:01:42 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-02 12:36:18 -0700 |
commit | 4a5f3c8b930d319ce2ecc802a0868164f18034db (patch) | |
tree | 43992b6fe4c68cc13772ad1d6eb7c47fb5aa6425 /src/corelib/thread/qthread.h | |
parent | f44072ca437bc943ac45e4bee69720499a0f8843 (diff) |
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 <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r-- | src/corelib/thread/qthread.h | 12 |
1 files changed, 2 insertions, 10 deletions
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 <QtCore/qdeadlinetimer.h> // For QThread::create -#if QT_CONFIG(cxx11_future) -# include <future> // for std::async -# include <functional> // for std::invoke; no guard needed as it's a C++98 header -#endif +#include <future> // for std::async +#include <functional> // 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 <intrin.h> @@ -70,10 +68,8 @@ public: bool event(QEvent *event) override; int loopLevel() const; -#if QT_CONFIG(cxx11_future) || defined(Q_QDOC) template <typename Function, typename... Args> [[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<void> &&future); -#endif static Qt::HANDLE currentThreadIdImpl() noexcept Q_DECL_PURE_FUNCTION; friend class QCoreApplication; friend class QThreadData; }; -#if QT_CONFIG(cxx11_future) template <typename Function, typename... Args> QThread *QThread::create(Function &&f, Args &&... args) { @@ -136,7 +129,6 @@ QThread *QThread::create(Function &&f, Args &&... args) std::move(threadFunction), std::forward<Args>(args)...)); } -#endif // QT_CONFIG(cxx11_future) /* On architectures and platforms we know, interpret the thread control |