summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-02-18 09:33:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-20 08:10:06 +0100
commita01b7dad50a526189f8f3abe6f48290458225f02 (patch)
tree5548cf044175aae69729a5d32888d2ca6466ca7b /tests/auto/other
parentac127a8c09ab91d15adb1cb9d44123f3e0185e00 (diff)
Remove qSort usages from tests
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I4c48db80533802e37771d3967fa10bfb7000cb9a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp4
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index a99b041bfc..237e50ae3d 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -50,6 +50,8 @@
#include <QOpenGLPaintDevice>
#endif
+#include <algorithm>
+
class tst_Lancelot : public QObject
{
Q_OBJECT
@@ -114,7 +116,7 @@ void tst_Lancelot::initTestCase()
QSKIP("Aborted due to errors.");
}
- qSort(qpsFiles);
+ std::sort(qpsFiles.begin(), qpsFiles.end());
foreach (const QString& fileName, qpsFiles) {
QFile file(scriptsDir + fileName);
file.open(QFile::ReadOnly);
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index dc3f266025..53f74d091b 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -73,6 +73,8 @@
#include "QtTest/qtestaccessible.h"
+#include <algorithm>
+
// Make a widget frameless to prevent size constraints of title bars
// from interfering (Windows).
static inline void setFrameless(QWidget *w)
@@ -2192,7 +2194,7 @@ void tst_QAccessibility::dialogButtonBoxTest()
for (int i = 0; i < iface->childCount(); ++i)
buttons << iface->child(i);
- qSort(buttons.begin(), buttons.end(), accessibleInterfaceLeftOf);
+ std::sort(buttons.begin(), buttons.end(), accessibleInterfaceLeftOf);
for (int i = 0; i < buttons.count(); ++i)
actualOrder << buttons.at(i)->text(QAccessible::Name);
@@ -2243,7 +2245,7 @@ void tst_QAccessibility::dialogButtonBoxTest()
for (int i = 0; i < iface->childCount(); ++i)
buttons << iface->child(i);
- qSort(buttons.begin(), buttons.end(), accessibleInterfaceAbove);
+ std::sort(buttons.begin(), buttons.end(), accessibleInterfaceAbove);
for (int i = 0; i < buttons.count(); ++i)
actualOrder << buttons.at(i)->text(QAccessible::Name);