summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-06 15:01:32 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-06 14:50:37 +0000
commitc01b60a4882f256eea58ffc87d3aac9ce146f98d (patch)
treec6369b1aa4b48be6741850862bcdf20d68edd179 /examples
parent1347a8ea80373ba3f5859ad2381c514526d3faa4 (diff)
Fix some deprecation warningsv5.13.0-alpha1
xychart/qxyseries.cpp:1025:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] areachart/areachartitem.cpp:281:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] areachart/areachartitem.cpp:299:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] declarativecategoryaxis.cpp:86:57: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<QPair<QString, double> >::iterator; LessThan = bool (*)(const QPair<QString, double>&, const QPair<QString, double>&)]’ is deprecated: Use std::sort [-Wdeprecated-declarations] Change-Id: I0d7705be8690405a439e18ea0ddbfaef433037a4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/charts/boxplotchart/boxdatareader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/charts/boxplotchart/boxdatareader.cpp b/examples/charts/boxplotchart/boxdatareader.cpp
index 10591135..f634bd4e 100644
--- a/examples/charts/boxplotchart/boxdatareader.cpp
+++ b/examples/charts/boxplotchart/boxdatareader.cpp
@@ -29,6 +29,8 @@
#include "boxdatareader.h"
+#include <algorithm>
+
BoxDataReader::BoxDataReader(QIODevice *device) :
QTextStream(device)
{
@@ -56,7 +58,7 @@ QBoxSet *BoxDataReader::readBox()
for (int i = 1; i < strList.count(); i++)
sortedList.append(strList.at(i).toDouble());
- qSort(sortedList.begin(), sortedList.end());
+ std::sort(sortedList.begin(), sortedList.end());
//! [3]
int count = sortedList.count();