diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-09-16 12:54:45 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-10-06 05:51:54 +0000 |
commit | cb08b40976150b679d2978f82e3b7ba7c1732780 (patch) | |
tree | 2aee35de3bca6e16ab02f57ecb9576177c93e9dd /tests | |
parent | db1027bc360cb86526d95dd0d7f36107a4d36b47 (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 'tests')
-rw-r--r-- | tests/auto/corelib/thread/qthread/tst_qthread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index 27a617ec85..0405896ca7 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -1338,7 +1338,7 @@ void tst_QThread::quitLock() void tst_QThread::create() { -#ifndef QTHREAD_HAS_CREATE +#if !QT_CONFIG(cxx11_future) QSKIP("This test requires QThread::create"); #else { @@ -1586,7 +1586,7 @@ void tst_QThread::create() } #endif // QT_NO_EXCEPTIONS #endif // QTHREAD_HAS_VARIADIC_CREATE -#endif // QTHREAD_HAS_CREATE +#endif // QT_CONFIG(cxx11_future) } class StopableJob : public QObject |