qt5base-lts/tests/auto/concurrent/qtconcurrentrun
Jarek Kobus 765f503b1e QtConcurrent: Introduce runWithPromise()
The differences to run() method:
1. The passed function should have additional
   argument QPromise<T> &, declared as a first argument.
2. The return value of the function must be void.
   Result reporting should be done through
   passed QPromise<T> &promise argument.
3. By default, runWithPromise() doesn't support functors
   with overloaded operator()().
   In case of overloaded functors the user
   needs to explicitly specify the result type
   as a template parameter passed to runWithPromise,
   like:

   struct Functor {
       void operator()(QPromise<int> &) { }
       void operator()(QPromise<double> &) { }
   };

   Functor f;

   runWithPromise<double>(f); // this will select the 2nd overload

Task-number: QTBUG-84702
Change-Id: Ie40d466938d316fc46eb7690e6ae0ce1c6c6d649
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-19 12:46:10 +02:00
..
.gitignore Move QtConcurrent into its own module 2012-02-05 17:49:16 +01:00
CMakeLists.txt CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qtconcurrentrun.pro Adapt to the C++ SIC introduced by P0012: noexcept overloading 2017-02-17 13:57:30 +00:00
tst_qtconcurrentrun.cpp QtConcurrent: Introduce runWithPromise() 2020-08-19 12:46:10 +02:00