summaryrefslogtreecommitdiffstats
path: root/src/concurrent
Commit message (Collapse)AuthorAgeFilesLines
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-2/+2
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-2420-380/+220
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QtConcurrent::run: allow to select the thread pool on which to run the taskMarc Mutz2014-08-054-3/+317
| | | | | | | | | | | | This is the second and last part of the forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1281 [ChangeLog][QtConcurrent] run() now optionally takes as its first argument the QThreadPool to run the task on. Task-number: QTBUG-17220 Change-Id: I4b46eca6ef7de9cd34dac07e6d4b8ad830426b97 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Removed "url" variable from qdocconf files.Jerome Pasion2014-07-041-1/+0
| | | | | | | | url is set in qtbase/doc/global which is inherited by the Qt 5 module qdocconf files. Change-Id: Ieffa174f598f4a3b8ce8be9bfae7ca9b6981f12b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Add docs for QtConcurrent::{Unhandled,Exception}Marc Mutz2014-03-171-0/+14
| | | | | | Change-Id: I2a9f28e572f8e59e260f659b6d17721037cbd38e Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove level 4 compiler warnings from MSVC.David Schulz2014-03-151-0/+2
| | | | | | | | | | Task-number: QTBUG-7233 Change-Id: I52067e3a22e98a62fd87415906e54a54ff2d6b49 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Dave McClelland
* QtConcurrent: Extend workaround GCC bug 58800 in median calculationNikolai Kosjar2014-02-191-2/+4
| | | | | | | | | | | | | GNU/Linux distributions like Fedora update the __GLIBCXX__ date (e.g. because of applied extra patches on top) and thus make the current workaround useless. As long as no official gcc/libstdc++ version is released, we can increment the "upper bound" date to cover such cases. See also comment #1 at QTCREATORBUG-11129. Change-Id: I1fdf6f312664163f6a99a8eddf490646ff25a87d Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtConcurrent: Workaround GCC bug 58800 in median calculationNikolai Kosjar2013-12-031-0/+9
| | | | | | | | | | 1) Revert 880b614 for libstdc++ <= 4.7.3 || (4.8.0 >= ... <= 4.8.2) 2) Fix off-by-one error in reverted code for Median::_bufferSize <= 2. Task-number: QTBUG-35058 Change-Id: I9d226c2806c1cf06c3d5b9c9f371262d2d69bf2b Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Updated url variable in qdocconf files.Jerome Pasion2013-11-061-1/+1
| | | | | | | | | | | | | | In 5.2, the HTML output is in a flatter structure and when they are hosted in qt-project.org/doc, the documentation will be found at http://qt-project.org/doc/qt-$QT_VER The url variable is used by projects outside of Qt 5 which need to link to Qt 5 documentation, such as Qt Creator. Task-number: QTBUG-34584 Change-Id: Ifa55fcd9e402b0e184a41e316340e46aeb7101de Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Revert "QtConcurrent::Median: add some qMove()"Marc Mutz2013-11-041-2/+2
| | | | | | | | | | This reverts commit 12bd604f241d41d52ab3fde9f4a8f4f5c2f3fa6d. This causes problems in QtCreator without anyone being able to say why. Task-number: QTBUG-34397 Change-Id: I7733c3db7d35bba2734e128476aabcb0152a91e4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* use private linkage where possibleOswald Buddenhagen2013-10-311-1/+1
| | | | | | Change-Id: Ie8eaa71bee87654c21218a23efd7e9d65b71f022 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove unofficial Qt Concurrent headersSze Howe Koh2013-10-303-37/+10
| | | | | | | | | | | | | | | <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-286-32/+21
| | | | | | | | | | 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: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-15/+15
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtConcurrent: remove a using declaration in a header fileMarc Mutz2013-10-053-14/+12
| | | | | | | See Sutter/Alexandrescu, Item 59, for rationale. Change-Id: Ie689e2a00f9ed0fce1ccfdb77c943dd1b1beb4dc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Adding "qtdoc" to the depends qdocconf variable.Jerome Pasion2013-09-261-1/+1
| | | | | | | -needed to link to Qt 5.2 docs (as seen on the navigation bar) Change-Id: Icc0bdb95231dbccd0393d4f401daafd8bcb30472 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QtConcurrent::IterateKernel: fix a race on a cache variableMarc Mutz2013-09-261-3/+6
| | | | | | | | | | | | | | | | | getticks() can be called concurrently, so accessing a non-atomic static long, even when the assignment will produce the same value in evey case, constitutes a data race. Fixed by making 'useThreadCpuTime' atomic. Since atomic long's might not be supported on all platforms, use an atomic int instead. To avoid a narrowing conversion, and since we're not interested in the return value of sysconf(), only whether it succeeded, convert any non-error return value to 0 prior to storing in the atomic. Change-Id: Ic285f7801327b30ddcd9c24bf1ccee3112a447b1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-214-7/+7
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Doc: Remove duplicated Qt Concurrent overviewSze Howe Koh2013-09-163-5/+5
| | | | | | | | | | | | | | | | | | - 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>
| * Doc: Remove space between class name and method nameSze Howe Koh2013-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | Previously, the generated documentation contained "QFutureWatcher:: progressValueChanged()". While it is legal C++, it prevented QDoc from auto-linking to the QFutureWatcher class reference. Change-Id: I2cace763f1825b0b4478b2bde95679d25df8bb5e Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QtConcurrent: fix median calculationMarc Mutz2013-09-121-1/+1
| | | | | | | | | | | | | | | | The median, for arrays of odd size, is found in [size/2], not [size/2+1]. For arrays of even size, the code doesn't work anyway, so nothing to do there. Change-Id: Id23ff3fe9538c2d8ef8f88e23127cb92af08b444 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QtConcurrent::Median: add some qMove()Marc Mutz2013-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | In case this code is ever instantiated with a type that actually benefits from moving. 'value' is save to move since it was passed to the function by value. '*mid' is save to move since it originates in a container that will be discarded on the next line anyway. Change-Id: I13587be10974ba6cf95d56e0f8912ff88167b60b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QtConcurrent: use nth_element to calculate the (correct) medianMarc Mutz2013-09-121-3/+4
| | | | | | | | | | | | | | | | Sorting is O(NlogN) complexity, while nth_element is linear. Also remove the errornous +1 when calculating the median position. Change-Id: Ib39085b59a6c5d15a3a940b1ce3377080340bc09 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove qSort usages from QtConcurrentGiuseppe D'Angelo2013-09-111-2/+3
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I07a8b13f75eb789c45a7c2ef11c0dc15d9fdf8f6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Doc: Adding navigation configs in the module qdocconf files.Jerome Pasion2013-06-251-0/+3
|/ | | | | | | | -The navigation bar requires the titles of the landing page and relevant pages. Change-Id: I5d5986b2bf74205cd49957b63fd6ac4e32cbb36b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Removed pages from "technology-apis" group.Jerome Pasion2013-05-271-2/+0
| | | | | | | | "technology-apis" doesn't serve a purpose anymore and its product function is replaced by the new overviews on the landing page. Change-Id: I1e959981fd163966a54bec0d697bed12007c39e6 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Doc: Give C++ class lists consistent titlesSze Howe Koh2013-04-291-1/+1
| | | | | | | | | | | | | The majority format is "<Qt Module> C++ Classes" (see http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html) Also, fix a broken link (Qt Network C++ Classes) "<Qt Module> C++ API" is perhaps the more correct format, but that's part of a much bigger cleanup: QTBUG-30556 Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-165-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * fix doc page urlsOswald Buddenhagen2013-02-041-1/+1
| | | | | | | | | | | | | | they are versioned nowadays Change-Id: I839db633e9d7d63c9d445f8e914b529bd7ce60a2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * substitute fixed version numbers in qdocconf files with variablesOswald Buddenhagen2013-02-011-5/+5
| | | | | | | | | | | | Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2915-30/+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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2225-25/+25
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1825-25/+25
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-161-1/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Fix compilation of Qt Concurrent with gcc 4.3Thiago Macieira2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | GCC 4.3 had support for decltype but not the new function syntax (which we call "auto function" for short). That meant the code did not compile. qtconcurrentrun.h:105: error: expected initializer before ‘->’ token Task-number: QTBUG-28984 Change-Id: I792276ec59c4f6e73f6137c517636e70c71ed849 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Bump Qt version to 5.1.0Frederik Gladhorn2013-01-151-5/+5
|/ | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-0812-26/+26
| | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix standalone header compilationThiago Macieira2012-12-231-0/+1
| | | | | | | qtconcurrentfunctionwrappers.h:277:22: error: 'QStringList' was not declared in this scope Change-Id: I54c48386d90146c872679672a1d8cc3675d49c39 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Bump Qt version to 5.0.1Sergio Ahumada2012-12-211-5/+5
| | | | | Change-Id: Ie8f437b8dfe8a67c7b34321439dd988a02612437 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixup concurrent docsLars Knoll2012-11-304-8/+135
| | | | | | | qdoc now finds an overview and the concurrent namespace. Change-Id: I2cd15bc19091f53bd2bb98919e685d49d473dbec Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix example paths in example manifests that are used by Qt Creator.Eike Ziller2012-11-261-0/+2
| | | | | | Task-number: QTBUG-27801 Change-Id: I345c009fc0e4e1c1eabb43ad142e3b474e7a6fee Reviewed-by: hjk <qthjk@ovi.com>
* Doc: Cleaning up QHP information in module configuration files.Jerome Pasion2012-11-071-12/+7
| | | | | | | | | | | | | | | | | | | | | There is a common standard among all Qt modules. These changes affect the final .qch file for each module. Changes: 1)URL in qt-project.org is confirmed by DevNet maintainer url = http://qt-project.org/doc/<module> 2)Landing page title mapping indexTitle = landing page 3)"C++ Classes" as a child node. The list of C++ classes and the titles are specified in the wiki. 4)Removed extra subprojects. They are not needed for now. Each module may need additional nodes. Change-Id: I1825476c21fe9aaddc9d6b512ff74229f17271a0 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Removed the HTML template from the .qdocconf filesJerome Pasion2012-10-261-1/+0
| | | | | | | -qt-module-defaults.qdocconf already contains the HTML template. Change-Id: I5757741166f0f688ce0e8a4e77ed45fd4d72f1c7 Reviewed-by: Martin Smith <martin.smith@digia.com>
* remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-2/+0
| | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Modularize documenation buildTor Arne Vestbø2012-10-102-6/+4
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Move QFutureSynchronizer back to QtCoreMarc Mutz2012-09-284-333/+0
| | | | | | | This class, too, belongs with QFuture. Change-Id: I41a532ca66c156f1631e4b22ffc1a5879c854488 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFutureWatcher back to QtCoreMarc Mutz2012-09-285-964/+0
| | | | | | | | This belongs with QFuture. Change-Id: I555cd01c1d3890fbbaca4fd8a9170292ea4eb0fb Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFuture from QtConcurrent to QtCoreMarc Mutz2012-09-2813-2098/+5
| | | | | | | | | This class belongs to QThreadPool/QRunnable more than to QtConcurrent, so move to QtCore, where QThreadPool awaits it. Change-Id: Ibf20288a986593bf779453427c2dae8db1e1423a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>