[Development] QThread::create mandatory in Qt 6?

Thiago Macieira thiago.macieira at intel.com
Sat Nov 14 04:51:54 CET 2020


QThread::create is still behind a few #ifdefs in Qt 6. It requires:

1) a configure-time check for C++11 std::future and std::async
2) a compile-time check for C++14 std::invoke and some C++14 language features

#1 enables the create() function at all; #2 enables the ability to pass a 
callable that takes argumentst and those extra arguments to create() .

During Qt 5 that made sense because we only required C++11. Qt 6 requires 
C++17 core language. Do we also want to require C++17 standard library? Or at 
least the C++14 standard library? Or even the C++11 library?

The reason I ask is that there is one platform in the CI that is currently 
failing to compile some QThread::create-using code because even #1 is failing. 
That is, it doesn't have complete C++11 standard library support (or the cmake 
test is failing for other reasons).

Do we want to kick it to the curb?

I think we should require #1 and #2 to pass and simply remove the tests. 
Simply make qthread.h assume they are there and let the build fail if not.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list