summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent
Commit message (Collapse)AuthorAgeFilesLines
* Compile autotests for IntegrityTatiana Borisova2021-09-201-2/+4
| | | | | | | | | - process environment/DNS are OFF for INTEGRITY Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: I189a97f88c96a428586c31a66b8d250e04482900 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix QtConcurrent::blockingMapped to work with non-template sequencesSona Kurazyan2021-09-083-0/+195
| | | | | | | | | | | | | | | The code for deducing the type of output sequence was assuming that the input sequence is always a template class and was trying to use the corresponding container type for the output sequence. Fixed the deduction code, to assume that the output sequence has the same type as the input sequence, when it's not a template class. Also added tests to verify that all QtConcurrent functions support non-template input sequences. Fixes: QTBUG-30617 Pick-to: 6.2 6.1 Change-Id: I486fe99f3207cfff5dcceb3712cc7de863067edb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtConcurrent::run: support non default-constructible return typesSona Kurazyan2021-08-181-0/+12
| | | | | | | | | | | | | | The QtConcurrent::RunFunctionTask class keeps a variable to store the result of QtConcurrent::run when it becomes available, so that it can be reported afterwards. This requires the result type to be default-constructible. However there's no need in storing the result, it can be reported immediately after it becomes available. Pick-to: 6.1 6.2 Fixes: QTBUG-95214 Change-Id: I95f3dbff0ab41eaa81b104a8834b37d10a0d193a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix QtConcurrent to properly work with functorsSona Kurazyan2021-07-212-207/+421
| | | | | | | | | | | | | | | QtConcurrent reduce functions were requiring to explicitly pass the the result type when passing functors as reductor. This was because of inability to deduce the result type from the functors. The result type of the QtConcurrent reduce functions should match with the type of the fist argument of the operator() when a functor is passed. Reused the ArgResolver type trait (already used for QFuture and QtConcurrent::run) to find out the result type in that case. Task-number: QTBUG-88448 Change-Id: Ief0eeee197df8cb9c30f3403d71978f36e4fb0f2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_QtConcurrentThreadEngine: fix the threadCount() testSona Kurazyan2021-07-121-8/+4
| | | | | | | | | | | | | | | Enable the check, that has been disabled because of instability, which makes the test-case useless. The reason for instability probably was that it doesn't always start maxThreadCount number of threads: it could be less if the workers reuse the thread pool's already created threads (if possible) instead of creating new one each time. But we can at least make sure, that we're not starting more threads than expected. Task-number: QTBUG-94463 Pick-to: 5.15 6.1 6.2 Change-Id: I8e498c377d86c49758bde0114fe6f7e0432fe993 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Remove the dead code for blocking methods from QtConcurrentSona Kurazyan2021-06-142-118/+29
| | | | | | | | | | | | | | After 79fd1cb2c631b6084bf10874205d27f5b53c907a the methods for running QtConcurrent algorithms in the blocking mode aren't used anymore. Since ThreadEngineBase and ThreadEngineStarter classes aren't meant to be used externally, it should be fine to remove startBlocking() methods now. Removed the unused code and adjusted the tests accordingly. Change-Id: Ifb13820ce207869d6f720bcb5be8d35bb355fe33 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix gcc warnings from having only one of assignment/copyVolker Hilsheimer2021-04-111-0/+2
| | | | | | | | | | | For example: warning: implicitly-declared ‘constexpr Complex& Complex::operator=(const Complex&)’ is deprecated [-Wdeprecated-copy] Pick-to: 6.1 Change-Id: I7598e821acb7cb7bf17776d693af62778185afc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a few compiler warnings in testsAllan Sandfeld Jensen2021-02-021-2/+2
| | | | | Change-Id: I22f6ac8ed02dd4ef4083ce3c781552623a0b08da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-122-27/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-079-50/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-229-11/+16
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-102-3/+4
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QtConcurrent: filter/map reduction without default ctorIvan Solovev2020-12-042-0/+78
| | | | | | | | | | | | | | | | | Previously a default constructor was required for the result type of mappedReduced() and filteredReduced(), even if a default value was provided. This patch fixes the problem. The issue was in the ResultReporter type, that was calling QList::resize() to adjust the size of expected reported results. A default-value parameter was added to the class, so that a corresponding overload of QList::resize could be invoked. Task-number: QTBUG-88452 Change-Id: I51113753e314d76aa74d201b5a7e327a6ca75f47 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix compiler warnings from mixing signed/unsigned intsVolker Hilsheimer2020-12-011-3/+3
| | | | | Change-Id: I146203dd8b6dddabc0a7cf4b3db8a3fd379fc0c6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix compiler warning from comparing signed to unsignedVolker Hilsheimer2020-11-271-1/+1
| | | | | | std::vector::size returns size_t, which is unsigned. Change-Id: I81ba3d58a1bd3a3c3d90c911263a5c0df0441b16 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Automatically generate unit tests for QtConcurrentAndreas Buhr2020-11-0920-45/+1947
| | | | | | | | | | There are many different ways to to call map and filter functions in QtConcurrent. This patch adds a python script to generate all possible combinations. Change-Id: I61ed1758601e219c5852e8cc939c5feebb23d2f6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Improve QtConcurrent::blockingMapped testsSona Kurazyan2020-11-041-18/+11
| | | | | | | | | | | | | QtConcurrent::blockingMapped was not able to determine the result type in case of passing containers that have more than one template argument. This should be fixed by the parrent commit. Also fixed some unrelated compiler warnings. Change-Id: I96618dc955c5e4c3792f28f6436d6851745dc01d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use universal references for passing callables in QtConcurrentSona Kurazyan2020-10-303-0/+411
| | | | | | | | Task-number: QTBUG-87596 Change-Id: I219f08d73b97317820ec6e329ab1e6c89c0545f1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Forbid implicit conversions between QFuture and other typesSona Kurazyan2020-10-303-43/+55
| | | | | | | | | | | | | | | | | | | | | - Remove the casting operator of QFuture<T> to T. It calls QFuture::result(), which may lead to undefined behavior if the user has moved the results from QFuture via QFuture::takeResult() before trying to do the conversion. - Disable implicit conversion of QFuture<T> to QFuture<void>, by making the constructor explicit. If the users really intend to do the conversion, they should do it explicitly. [ChangeLog][Source-Incompatible Changes][QFuture] Implicit conversions of QFuture<T> to T and to QFuture<void> have been disabled. Use QFuture::result() or QFuture::takeResult() where you need to convert QFuture<T> to T. Use the explicit QFuture<void>(const QFuture<T> &) constructor to convert QFuture<T> to QFuture<void>. Change-Id: I153d4137d36365b1611ac934fb3ac2eb667fdd6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtConcurrent: Provide a test for runWithPromise with handlersJarek Kobus2020-10-301-1/+110
| | | | | | | | | | | | | | | | Test runWithPromise with "then" and "onCanceled" handlers. Test the case when QFuture::cancel() is being called when the task's thread already started, so that a call to QPromise::isCanceled() from inside the running thread returns different values in the same task's run. This nicely proves that communication between QFuture and QPromise works between different threads. Task-number: QTBUG-84868 Change-Id: Icb2e0b1f99e2dcd919d881515f1ccd08e2f25b8c Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Workaround gcc compiler bugVolker Hilsheimer2020-10-292-16/+16
| | | | | | | | | | | | | | | | For the comparison of a QFuture<int> and an int, gcc creates code that creates a qfloat16 instance, as can be seen when stepping through this code: QFuture<int> future; int five = 5; if (future == five) return five; Explicitly get the result of the QFuture to compare as a workaround. Change-Id: Id2adc2268dbc0ccec7df3a9786c9d29dcdc04da3 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QtConcurrent: Handle running with promise inside QTaskBuilderJarek Kobus2020-10-281-6/+49
| | | | | | | | | | | Please note, that in case of run with promise it doesn't make sense to provide the overload taking the FutureResult, as if we are going to ignore the returned QFuture object, we can't communicate with the passed QPromise. Fixes: QTBUG-87083 Change-Id: I4066506736c2bbeea3e42030b9495f13e06cb27e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QtConcurrent: Integrate runWithPromise into runJarek Kobus2020-10-281-159/+217
| | | | | | Change-Id: I6eb95aa66ff847e8bb9aac348fded3a5d55015b6 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Store std::exception_ptr in QUnhandledExceptionSona Kurazyan2020-10-262-12/+50
| | | | | | | | | | | | | | | | For historical reasons Qt Concurrent reports QUnhandledException in case if an exception that is not derived from QException is thrown from a worker thread. Changing this behavior may not be a good idea, since the existing user code may rely on it. Changed QUnhandledException to wrap the std::exception_ptr to the actual exception, so that the users can obtain the information about the thrown exception if needed. [ChangeLog][QtCore][QUnhandledException] Improved QUnhandledException to store the std::exception_ptr to the actual exception thrown from a QtCocnurrent worker thread. Change-Id: I30e7c1d3e01aff6e1ed9938c421da0a888f12066 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use parameter_type in QList methodsAndrei Golubev2020-10-222-6/+8
| | | | | | | | | QList::parameter_type is defined and used to give better performance e.g. for arithmetic types. Let's use it consistently in QList API instead of const T & Change-Id: I2e12bd83f55679b55a14fbb23ab6172a9cf7bbcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move file of test helpers out of directory for qtconcurrentmap testsAndreas Buhr2020-10-163-2/+2
| | | | | | | | | | | The test helpers are used both in the qtconcurrentmap tests and in the qtconcurrentfilter tests. In the future, they should also be used in generated tests. This patch moves the function out of the qtconcurrentmap folder as it is not specific to 'map'. Change-Id: Ie79a7ae3040a7eab7364a3aabf934158c7527b5a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Loosen the requirements on the container passed to QtConcurrent::map*Sona Kurazyan2020-10-131-2/+0
| | | | | | | | | | | | Using std::begin() and std::end() forces the user to have const begin() and end() member functions being defined for the passed container. This is because std::declval<T>() returns rvalue which forces the compiler to select std::{begin, end}()(const Container &c) overloads and an test for a presence of const {begin, end}() methods. Change-Id: I9d96d9f73891ece53224f1741a1334500f7b35ad Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Enable some-of the QtConcurrent test casesSona Kurazyan2020-10-122-8/+9
| | | | | | | | | | | QtConcurrent::filtered test-cases for move-only containers were failing to compile, because it is assumed that the passed container should have value_type defined. Change-Id: I3e9e5ebc07704cb98a15b125ae8bd5b5a84d497a Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-2/+2
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add unit tests to assure QtConcurrent works on move-only sequencesAndreas Buhr2020-10-073-78/+291
| | | | | | | | | Unit tests are added to make sure QtConcurrent works on move-only sequences. Change-Id: I1d066f75ceab9cef98832e96c5827103cbfd72a8 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use universal references in QtConcurrentSona Kurazyan2020-09-301-2/+51
| | | | | | | | | | | | | | Changed QtConcurrent algorithms to take the passed sequences as universal references, where it makes sense. In addition to avoiding to create extra copies when passing rvalues, this change allows passing temporary container adaptors to QtConcurrent::map (e.g. see the example in the ticket and the new test-cases). Task-number: QTBUG-83170 Change-Id: Ia7c0833f4ec1d860294fa5214cd53934b65ff084 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QtConcurrent algorithms to work with temporary sequencesSona Kurazyan2020-09-282-0/+102
| | | | | | | | | | | | | | | | QtConcurrent algorithms are making an internal copy of the passed sequence, to make sure it won't be destroyed before the execution is finished. However, they were using iterators of the originally passed sequence. So, if the original sequence is deleted, QtConcurrent algorithms would use invalid iterators to a deleted sequence. This might work with Qt containers thanks to implicit-sharing, but with other containers will lead to unexpected results. Fixed them to work on the internal copy of the original sequence. Change-Id: I1d68692ed9746223c85f51bb05977bc1443b681d Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-239-11/+9
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-112-30/+30
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtConcurrent: Introduce runWithPromise()Jarek Kobus2020-08-191-1/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-095-5/+5
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QList instead of QVector in concurrent testsJarek Kobus2020-06-223-21/+22
| | | | | | | Task-number: QTBUG-84469 Change-Id: Ia8113ef044a918e46176bfa3f4b34781dc69dd03 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Reuse the non blocking implementation for blocking oneJarek Kobus2020-06-052-69/+55
| | | | | | | | | | | | | | | | | Replace the implementation of blockingMappedReduced(): after calling non-blocking version of mappedReduced() we are getting the future object, so we may call in sequence result(), which will block and return the result when the all tasks are done. The same is done with blockigMapped(), which calls blockingMappedReduced() with a custom reduce function. Looks like with this pattern we can reuse the non-blocking version for implementing blocking version of mapped / filtered methods. Task-number: QTBUG-83918 Change-Id: I7f240cfbd04834d551ff79d717b72194a26996d7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Enable setting custom QThreadPool for QtConcurrent methodsJarek Kobus2020-05-184-7/+589
| | | | | | Task-number: QTBUG-53465 Change-Id: Icff05d5f65dce453ff702502b85c35e20fca86a9 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add more tests for QtConcurrent::filterReduced()Jarek Kobus2020-05-072-0/+115
| | | | | | | | | | Test the case where reduce function of the form: V function(T &result, const U &intermediate) has T and U types different. Task-number: QTBUG-83802 Change-Id: Ic89396caba16e7e47ae3ec1527e31b8620f1b08c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Cleanup the qtconcurrentfilter testJarek Kobus2020-05-071-1402/+357
| | | | | | | | | | | | | | | | | Get rid of code repetition in concurrentfilter test. Move tests with initial value next to their original version. Join new lambda tests into a common functions testing all possible 16 combinations of functor / function / member / lambda, as they test in fact the same function. There is no need to distinguish lambda case over other cases. This helps in test readability and maintenance. Add missing tests for lambdas with a combination of initial value. Task-number: QTBUG-83802 Change-Id: I45930c1e18a9e4e561909f46a5cbbdf0ad7ba333 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Squash again some tests in concurrentmapJarek Kobus2020-04-211-351/+40
| | | | | | | | | | | | | After adding new tests, the source code of tst_concurrentmap grows rapidly with copy/paste/replace pattern. This intoduce the issue with maintaining the test. Get rid of separate functions for testing blocking versions of mapped/mappedReduced and test blocking versions in parallel with non-blocking flavors. So again, get rid of duplicated code. Task-number: QTBUG-83258 Change-Id: I4cac6f4e1bfd1b50363dc094610717674aebf2af Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add more tests for QtConcurrent::mappedReduced()Jarek Kobus2020-04-212-0/+221
| | | | | | | | | | | | Test the case where reduce function of the form: V function(T &result, const U &intermediate) has T and U types different. Make use of numberSumReduce function and corresponding functor that reduce Number class object to the result of int type. Fixes: QTBUG-83258 Change-Id: I194d290988b48e7bca91228c0cd5d39efd1b4712 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Get rid of code repetition in concurrentmap testJarek Kobus2020-04-211-1825/+439
| | | | | | | | | | | | | | | | Move tests with initial value next to their original version. Join new lambda tests into a common functions testing all possible 16 combinations of functor / function / member / lambda, as they test in fact the same function. There is no need to distinguish lambda case over other cases. This helps in test readability and maintenance. Add missing tests for lambdas with a combination of initial value. Task-number: QTBUG-83258 Change-Id: I7a3d2bf87384d7feecffaaf39281cd626955b0a4 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Improve Map|Map-Reduce and Filter|Filter-Reduce implementationKarsten Heimrich2020-04-143-16/+1008
| | | | | | | | | | | | | * support lambda expressions * remove the need to specify result_type * use std::invoke to apply map|filter function * remove usage of FunctionWrapper* and createFunctionWrapper Task-number: QTBUG-33735 Task-number: QTBUG-82646 Change-Id: Ibcbe4278f0742c29182bd506081db0abb516f85f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QTaskBuilder::spawn: add an overload that doesn't return a future objectVitaly Fanaskov2020-04-141-0/+15
| | | | | | Fixes: QTBUG-83175 Change-Id: Idf85e47a2732742884272200d5c753805eaa640b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Resolve Qt6 TODO items, replace Median and BlockSizeManagerKarsten Heimrich2020-04-091-15/+27
| | | | | | | | | | | * Replaces the, only internaly used, implementation of template class Median with a fixed size none templated version. * Replaces BlockSizeManager with an updated BlockSizeManager V2, but keeping the original name. * adapt the auto-test to take the fixed size array into account Change-Id: If76cb944676c4a06a7566ad0bc37ded25b81c70c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Regenerate projects after .pro files were modifiedAlexandru Croitor2020-04-031-0/+6
| | | | | | Change-Id: If6aec596bf68b209b42e0728dd6857eec8c261be Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtConcurrent: add fluent interface to configure a task before runVitaly Fanaskov2020-03-295-1/+173
| | | | | | | | Task-number: QTBUG-82950 Change-Id: I449da938b6b501a7646b3425edde5c880d6ca87e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
* QtConcurrent::run: accept more then five function's argumentsVitaly Fanaskov2020-03-111-74/+104
| | | | | | | | | | | | | | [ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run has the following signatures: run(Function &&f, Args &&...args) and run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member pointer, the first argument of args should be an object for which that member is defined (or a reference, or a pointer to it). See the documentation for more details. Fixes: QTBUG-82383 Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>