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; diff --git a/examples/widgets/painting/gradients/gradients.cpp b/examples/widgets/painting/gradients/gradients.cpp index ffca9f5560..14858b9749 100644 --- a/examples/widgets/painting/gradients/gradients.cpp +++ b/examples/widgets/painting/gradients/gradients.cpp @@ -42,6 +42,8 @@ #include "gradients.h" #include "hoverpoints.h" +#include + ShadeWidget::ShadeWidget(ShadeType type, QWidget *parent) : QWidget(parent), m_shade_type(type), m_alpha_gradient(QLinearGradient(0, 0, 0, 0)) { @@ -204,7 +206,7 @@ void GradientEditor::pointsUpdated() points += m_blue_shade->points(); points += m_alpha_shade->points(); - qSort(points.begin(), points.end(), x_less_than); + std::sort(points.begin(), points.end(), x_less_than); for (int i = 0; i < points.size(); ++i) { qreal x = int(points.at(i).x()); diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp index 36e0ad89b2..7a79560473 100644 --- a/examples/widgets/painting/shared/hoverpoints.cpp +++ b/examples/widgets/painting/shared/hoverpoints.cpp @@ -46,6 +46,8 @@ #include "arthurwidgets.h" #include "hoverpoints.h" +#include + #define printf HoverPoints::HoverPoints(QWidget *widget, PointShape shape) @@ -388,9 +390,9 @@ void HoverPoints::firePointChange() } if (m_sortType == XSort) - qSort(m_points.begin(), m_points.end(), x_less_than); + std::sort(m_points.begin(), m_points.end(), x_less_than); else if (m_sortType == YSort) - qSort(m_points.begin(), m_points.end(), y_less_than); + std::sort(m_points.begin(), m_points.end(), y_less_than); // Compensate for changed order... if (m_currentIndex != -1) {