summaryrefslogtreecommitdiffstats
path: root/src/concurrent
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* QFuture: remove unused includeMarc Mutz2012-09-283-3/+2
| | | | | | | | | | | qtconcurrentcompilertest.h defines the HasResultType<> template, which qfuture.h doesn't use. Include qtconcurrentcompilertest.h in the headers which actually use HasResultType<> instead. Change-Id: Ic5939ccf4c9058b2b624432c7ea48a5aca2236b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QtConcurrent::ResultStore as QtPrivate::ResultStore to QtCoreMarc Mutz2012-09-286-510/+14
| | | | | | | | | | No compatibility header needed. While this wasn't marked as private API, it wasn't documented, either. This is a prerequisite for moving QFuture to QtCore. Change-Id: I8e986e6e2a22fbe5cf08d0600ec39ae9ae993e20 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QtConcurrent::Exception as QException back to QtCoreMarc Mutz2012-09-2811-373/+22
| | | | | | | | | 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-2241-848/+848
| | | | | | | | 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>
* concurrent: Fix missing or improper include guard in headersSergio Ahumada2012-09-153-7/+7
| | | | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Also, cpp files should include their own headers first (but below config.h) Change-Id: I902c8936382f5c1a8e0de7dbf49e5423f9b72bbe Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Exclude the examples/widgets/doc dir for all but widgets.Frederik Gladhorn2012-08-291-0/+2
| | | | | | | | There are too many references to the QWidget lib documentation in there. On the other hand this keeps snippets working. Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QFutureInterface<void>: const-correct reportFinished()Marc Mutz2012-08-171-1/+1
| | | | | | | | The primary QFutureInterface::reportFinished() takes a const T *, so should the void sepecialisation. Change-Id: I4d3173f4fd4f8d27baecd407369659a42445aed7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>