summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentmap.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add \brief descriptions to QtConcurrent topicsSona Kurazyan2022-07-201-0/+1
| | | | | | | Fixes: QTBUG-104213 Pick-to: 6.4 6.3 6.2 Change-Id: Ib787546ef74133aca4b963a4341283147d2e8fb2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtConcurrent: fix examples of overloaded methods in docsSona Kurazyan2021-08-181-1/+4
| | | | | | | | | | | | Wrap the overloaded methods in qOverload(), to make the examples compile. Also remove the extra whitespaces when declaring nested templates. Pick-to: 6.1 6.2 Change-Id: If438caa6d705d9036dae45278fb26e080918da89 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update QtConcurrent docs and examples for reductor object usageSona Kurazyan2021-07-261-6/+2
| | | | | | | | | After 6ebe3d0f0806069f906522dfe9b81baa3f3478de users don't have to specify the result type when using functors for as a reductor. Task-number: QTBUG-88448 Change-Id: I065fed11c1a66833ba0aac3d18e7ff0545247be1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix typos in QtConcurrent documentationVolker Hilsheimer2020-11-081-2/+2
| | | | | | | Correct misplaced r-value references. Change-Id: I3aa641a4e055b2f907bd5c05cfccf2933c74d5bc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use universal references for passing callables in QtConcurrentSona Kurazyan2020-10-301-39/+39
| | | | | | | | 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>
* Make QtConcurrent docs more readableSona Kurazyan2020-10-121-3/+3
| | | | | | | | | | | | - Replaced 'auto' keyword in function signatures by the actual return type. - Fixed signatures to not include enable_if statements. Change-Id: I7292e8e506fd50d22974a86448fa4e85e8f08dfb Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use universal references in QtConcurrentSona Kurazyan2020-09-301-19/+19
| | | | | | | | | | | | | | 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 some qdoc warnings: QtConcurrent functors and exceptionsVolker Hilsheimer2020-09-221-4/+4
| | | | | Change-Id: I32e45c85cedb74a6dcbd99930910b730f1160fae Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtConcurrent: Add documentation for runWithPromise()Jarek Kobus2020-08-261-1/+1
| | | | | | Task-number: QTBUG-84702 Change-Id: Ic8233aeffbdbd1420bdbde7ad7d03f25cd438ea8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in QtConcurrentJarek Kobus2020-06-221-1/+1
| | | | | | | Task-number: QTBUG-84469 Change-Id: I99e41c1fef5459d7358b20a97a1dbefcd43bb4e5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Enable setting custom QThreadPool for QtConcurrent methodsJarek Kobus2020-05-181-7/+246
| | | | | | Task-number: QTBUG-53465 Change-Id: Icff05d5f65dce453ff702502b85c35e20fca86a9 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Improve Map|Map-Reduce and Filter|Filter-Reduce implementationKarsten Heimrich2020-04-141-28/+23
| | | | | | | | | | | | | * 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>
* Remove some dead codeKarsten Heimrich2020-04-091-12/+0
| | | | | | | Change-Id: I526d9baee260f018cec6076595a28be8596b6395 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtConcurrent: filter- and map-reduce with initial valueMårten Nordheim2020-03-041-0/+81
| | | | | | | | | | | | | | | | | It takes any type which is implictly covertible to the result type and then converts it in the outer-layers. Then it passes it into the deeper layers and initiales the result value. One drive-by fix with a missing letter in the documentation. [ChangeLog][QtConcurrent] QtConcurrent::mappedReduce and QtConcurrent::filteredReduced, as well as their blocking variants, now optionally take an initial value. Fixes: QTBUG-73240 Change-Id: I7a80d96693cfa3374847c75c75b3167664609c1a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QtConcurrent: Unify license headersKai Koehne2019-01-291-1/+1
| | | | | Change-Id: I9492ca18805c9663d48820424557595b8bc7eaa0 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* doc: Fix all qdoc errors in QtConcurrentMartin Smith2017-12-081-2/+38
| | | | | | | | | | | | | These errors resulted from the improved parsing provided by clang, which required rethinking which elements of the QtConcurrent API should be visible to clangqdoc. The basic problem is that clang must see declarations for all types used by a type, or else it either gets lost and fails to parse a type correctly, or it simply refuses to include the type in its AST. Change-Id: Iaa699c287e67d1288fcb2d83a9dbbaf07521d0cc Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Fix qdoc errors for \fn commands in QtConcurrentMartin Smith2017-12-081-16/+78
| | | | | | | | | | | | | This change updates the \fn commands in the QtConcurrent module, which makes extensive use of templates. Some of the update \fn commands are very long as a result. A few cases of the tag trick were used to fix qdoc errors for some complicated template function signatures that were marked \internal anyway. Change-Id: I8546b89030c51bb9dddf38fa10bc0248d901aa51 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix documentation for function objects with map/reduceVille Voutilainen2017-12-081-1/+8
| | | | | | | | | | | | | | The documentation claims that function objects just work with map-reduce. They work for the map function, but not for the reduce function. Making them work for the reduce function was deemed too complex for questionable benefit, so this patch explains the situation and provides a work-around. Task-number: QTBUG-22710 Change-Id: I7f706468e36031bc261234310d331001b96e5137 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Replace std::bind() with lambdas in Qt ConcurrentSze Howe Koh2017-03-071-15/+3
| | | | | | | Lambda functions provide all the benefits of std::bind() plus more Change-Id: Iec30b20bb35ac0fae560435b323f80af2f2e5fce Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Doc: Qt Concurrent: Link to essential usage informationTopi Reinio2015-04-071-6/+18
| | | | | | | | | | | | | | | | | | | | Functions under the QtConcurrent namespace used to be documented as header files, using the \headerfile command. These documents have been since converted to standard pages using the \page command, and the reference documentation for these functions now live in the namespace page only. However, the former pages contain useful usage information and code snippets, but they've not been linked to from anywhere. This change links to these pages from the module landing page, as well as from the function reference doc. Change-Id: Ia750d72d12503cec96ee2c9e202dd561e548cb24 Task-number: QTBUG-28977 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: Remove unofficial Qt Concurrent headersSze Howe Koh2013-10-301-17/+3
| | | | | | | | | | | | | | | <QtConcurrentRun>, <QtConcurrentMap>, and <QtConcurrentFilter> are not official headers. Developers should use <QtConcurrent> instead. As a side-effect, this patch also stops the function documentation from being duplicated (one copy in the QtConcurrent namespace page, one copy in the \headerfile pages) (For some reason, \brief doesn't work on standalone pages like these) Change-Id: I9482f014acf52ba734a3fa597cdcc5931fcd7ecf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Update boost::bind()/std::tr1::bind() to std::bind()Sze Howe Koh2013-10-281-9/+5
| | | | | | | | | | boost::bind() became part of the C++11 standard with minor modifications. Present the standard version as the main one to use, but list the others as alternatives. Change-Id: If419d8d24c0925119d3b9f7ff76be44981351bc0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Remove duplicated Qt Concurrent overviewSze Howe Koh2013-09-161-3/+3
| | | | | | | | | - The "Concurrent Programming" page is an exact duplicate of the Qt Concurrent module landing page. - The "qtconcurrent intro" target is not referenced anywhere. Change-Id: Ice9b4360783013fe972258ca54a0004be43b8766 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixup concurrent docsLars Knoll2012-11-301-2/+2
| | | | | | | qdoc now finds an overview and the concurrent namespace. Change-Id: I2cd15bc19091f53bd2bb98919e685d49d473dbec Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Move QtConcurrent::Exception as QException back to QtCoreMarc Mutz2012-09-281-8/+0
| | | | | | | | | Leave the old name as a deprecated typedef; adapt users. This is a prerequisite for moving QFuture back to QtCore. Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Modularize QtConcurrent documentation.Casper van Donderen2012-05-091-16/+16
| | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: If52f69c0f8bb4d2df4ee46f5524a82047ec214de Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Move QtConcurrent into its own moduleLars Knoll2012-02-051-0/+402
Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>