aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktestresult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmltest/quicktestresult.cpp')
-rw-r--r--src/qmltest/quicktestresult.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index d33687d248..67e80e7a0d 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -59,6 +59,8 @@
#include <QtGui/qvector3d.h>
#include <QtQml/private/qqmlglobal_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
static const char *globalProgramName = 0;
@@ -503,7 +505,7 @@ void QuickTestResult::stringify(QQmlV4Function *args)
result = QLatin1String("Object");
}
} else {
- QString tmp = value.toQString();
+ QString tmp = value.toQStringNoThrow();
if (value.asArrayObject())
result.append(QString::fromLatin1("[%1]").arg(tmp));
else
@@ -625,7 +627,7 @@ static QBenchmarkResult qMedian(const QList<QBenchmarkResult> &container)
return container.at(0);
QList<QBenchmarkResult> containerCopy = container;
- qSort(containerCopy);
+ std::sort(containerCopy.begin(), containerCopy.end());
const int middle = count / 2;