summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentmedian.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f Reviewed-by: Kai Koehne <kai.koehne@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>
* Resolve Qt6 TODO items, replace Median and BlockSizeManagerKarsten Heimrich2020-04-091-80/+3
| | | | | | | | | | | * 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>
* QtConcurrent: Unify license headersKai Koehne2019-01-291-1/+1
| | | | | Change-Id: I9492ca18805c9663d48820424557595b8bc7eaa0 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QtConcurrent::MedianDouble: do not access uninitialzed valuesChristian Ehrlicher2018-02-201-0/+1
| | | | | | | | | | | | Properly initialize MedianDouble::values in ctor. This fixes the following valgrind warnings in the unit test: Conditional jump or move depends on uninitialised value(s) at 0x40771E4: addValue (qtconcurrentmedian.h:161) by 0x40771E4: QtConcurrent::BlockSizeManagerV2::timeAfterUser() (qtconcurrentiteratekernel.cpp:195) Change-Id: I8c8e297a52caca38cd6191ae2653f2765d387077 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* doc: Fix all qdoc errors in QtConcurrentMartin Smith2017-12-081-3/+1
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-0/+66
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * Avoid heap allocations in Median classTobias Koenig2016-01-211-0/+66
| | | | | | | | | | | | | | | | | | Create a MedianDouble class and V2 version of BlockSizeManager, which use a fixed size array of double (since we always use 7 elements to calculate the median anyway). Change-Id: Ife90b90336a9a8c037b90726dee4cd2a1b8b6cd9 Reviewed-by: Marc Mutz <marc.mutz@kdab.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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-081-2/+2
| | | | | | | | 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>
* 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 configuration to a single fileJoão Abecasis2012-02-141-1/+1
| | | | | | | | | | | | | | This file lives in src/concurrent, alongside the rest of the library. Relevant configuration was moved out of qglobal.h, as it isn't relevant for other parties and thus isn't needed there. This introduces a global header that all QtConcurrent headers now include. This header includes qglobal.h and defines library-specific configuration for all to follow. Change-Id: If6f11e7bbc6139d29004eb1602bd579b75b637c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Move QtConcurrent into its own moduleLars Knoll2012-02-051-0/+129
Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>