summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qrunnable.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary ref-counting of QRunnableAllan Sandfeld Jensen2020-10-011-7/+4
| | | | | | | It could never be higher than 1 anyway. Change-Id: If33c7978a4397a08e9eb091926726725d8bd3ea6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove QThreadPool::cancel()Allan Sandfeld Jensen2020-06-051-2/+0
| | | | | | | Deprecated in 5.9 Change-Id: Ib6e2a5da1e7ee2664fb6fa496bdc880fab870901 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QRunnable::ref use in QThreadPoolAllan Sandfeld Jensen2020-05-071-1/+1
| | | | | | | | | | | | | | | | The reference counter could only ever be -1, 0 or 1, as an autoDeleted QRunnable can only be in a single thread pool. This commits keeps the reference counting for now, but asserts sanity, simplifies locking and fixes a leak. Pick-To: 5.15 Fixes: QTBUG-20251 Fixes: QTBUG-65486 Change-Id: I4de44e9a4e3710225971d1eab8f2e332513f75ad Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Improve argument name for std::function argumentAllan Sandfeld Jensen2020-02-261-1/+1
| | | | | | | | | | | | Less \a fun though. Note using references in this API would just duplicate the API, but still end up with a copy when creating the QRunnable. By having the copy apparent directly in the API, we not only save the duplication, we also hint to the caller to use move if they want to avoid a copy. Change-Id: If11476d4b38853839c1e87e0339807a1798fc875 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a constructor for QRunnable from anonymous functionsAllan Sandfeld Jensen2020-01-311-0/+2
| | | | | | | | | | This makes it easier to create one without having to create a derivative class. The patch also adds a path to avoid using QRunnable directly in QThreadPool. Change-Id: I9caa7dabb6f641b547d4771c863aa6ab7f01b704 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* 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>
* QRunnable: add Q_DISABLE_COPYMarc Mutz2015-06-021-1/+3
| | | | | | | | ...but only for Qt 6. It's a source-incompatible change, e.g. in a user hierarchy of clone()able runnables. Change-Id: I8610308dea46da19bda5c96985d35f31c43484be Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRunnable: declare dtor out-of-line and export classMarc Mutz2015-06-021-3/+2
| | | | | | | | | | De-duplicates vtables and enables RTTI on this hierarchy. Change-Id: Ia60f4aa446f93ab91ea8780a3acc1118210ba7d5 Reported-by: Volker Krause <volker.krause@kdab.com> Task-number: QTBUG-45582 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-2/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.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>
* 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>
* Move QtConcurrent into its own moduleLars Knoll2012-02-051-0/+72
Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>