From 384ca58e33eb1406243b7fece57ff01bd9675779 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 13 Sep 2013 20:46:54 +0200 Subject: Remove qSort usages from qtbase examples QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I68dec0cb6efa1f164ba9f1671b55332ee4ad2e23 Reviewed-by: Olivier Goffart --- examples/network/torrent/torrentclient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/network') diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index b5969e552e..f0f47fe884 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -50,6 +50,8 @@ #include #include +#include + // These constants could also be configurable by the user. static const int ServerMinPort = 6881; static const int ServerMaxPort = /* 6889 */ 7000; @@ -747,7 +749,7 @@ QList TorrentClient::weighedFreePeers() const } points << QPair(tmp, peer); } - qSort(points); + std::sort(points.begin(), points.end()); // Minimize the list so the point difference is never more than 1. typedef QPair PointPair; -- cgit v1.2.3