From 5957f245c6c77c98d7e90d614c9fe2cdbfe7e8e6 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sun, 2 Sep 2012 15:41:59 +0200 Subject: 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 Reviewed-by: Robin Burchell --- dist/changes-5.2.0 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'dist') 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()); + + 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) -- cgit v1.2.3