diff options
Diffstat (limited to 'examples/network/torrent/torrentclient.cpp')
-rw-r--r-- | examples/network/torrent/torrentclient.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 2db74164ef..356dc21a1f 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -50,6 +50,8 @@ #include <QtCore> #include <QNetworkInterface> +#include <algorithm> + // These constants could also be configurable by the user. static const int ServerMinPort = 6881; static const int ServerMaxPort = /* 6889 */ 7000; @@ -746,7 +748,7 @@ QList<TorrentPeer *> TorrentClient::weighedFreePeers() const } points << QPair<int, TorrentPeer *>(tmp, peer); } - qSort(points); + std::sort(points.begin(), points.end()); // Minimize the list so the point difference is never more than 1. typedef QPair<int,TorrentPeer*> PointPair; |