summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-09-16 12:54:45 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-10-06 05:51:54 +0000
commitcb08b40976150b679d2978f82e3b7ba7c1732780 (patch)
tree2aee35de3bca6e16ab02f57ecb9576177c93e9dd /src/corelib/thread/qthread.cpp
parentdb1027bc360cb86526d95dd0d7f36107a4d36b47 (diff)
Move detection of <future> to a configure test
<future> is needed by QThread::create. Instead of a fragile series of preprocessor tests, move its detection to a configure test. This dramatically simplifies the code, but on the other hand ties the availability of QThread::create() to the system used to compile Qt (rather the one used to compile an application). Change-Id: If1b06363379bf29126cfa68f2a0651cbb78a67f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index e3ba1e4449..e92be64dfa 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -925,7 +925,7 @@ bool QThread::isInterruptionRequested() const
\sa start()
*/
-#ifdef QTHREAD_HAS_CREATE
+#if QT_CONFIG(cxx11_future)
class QThreadCreateThread : public QThread
{
public:
@@ -947,7 +947,7 @@ QThread *QThread::createThreadImpl(std::future<void> &&future)
{
return new QThreadCreateThread(std::move(future));
}
-#endif // QTHREAD_HAS_CREATE
+#endif // QT_CONFIG(cxx11_future)
/*!
\class QDaemonThread