diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-09-02 15:41:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-21 13:59:01 +0200 |
commit | 5957f245c6c77c98d7e90d614c9fe2cdbfe7e8e6 (patch) | |
tree | e154481f5a93efef7fa3a0563ac9ffff61646c2b /dist | |
parent | 9bb99d8130747ecabe8287e4ca25a0a36503ed20 (diff) |
Mark most of the contents of QtAlgorithms as deprecated.
This is done per the mailing list discussion at
http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: Ic31c052e7f35c576250bf11826ca82e371142c82
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'dist')
-rw-r--r-- | dist/changes-5.2.0 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0 index 5e984a41d8..54f809ae25 100644 --- a/dist/changes-5.2.0 +++ b/dist/changes-5.2.0 @@ -46,3 +46,32 @@ QtCore When calling QTime::toString(Qt::TextDate) and QTime::toString(Qt::ISODate), milliseconds are now included in the returned string. This also applies to QDateTime::toString(Qt::TextDate) and QDateTime::toString(ISODate). + +- QtAlgorithms + With STL no longer being optional for building and using Qt, a number of parts + of QtAlgorithms no longer make sense, and have therefore been deprecated. + + Replacements are available in the STL, and generally have much better + performance, but are not instantly source-compatible in all cases. For + instance, specialization of qLess or qSwap means that a direct port to + std::sort from qSort may not be possible, as std::sort does not use any of + them; a possible workaround is explicitly passing a qLess functor to + std::sort: + + std::sort(container.begin(), container.end(), qLess<T>()); + + The functions in QtAlgorithms that have been deprecated, along with their + STL counterparts, are: + - qBinaryFind (std::binary_search / std::lower_bound) + - qCopy (std::copy) + - qCopyBackward (std::copy_backward) + - qEqual (std::equal) + - qFill (std::fill) + - qFind (std::find) + - qCount (std::count) + - qSort (std::sort) + - qStableSort (std::stable_sort) + - qLowerBound (std::lower_bound) + - qUpperBound (std::upper_bound) + - qLess (std::less) + - qGreater (std::greater) |