Remove qSort usages from widgets tests
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ica7639d16f52b4ffcd2c00cc806fed1378a7948b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
21fbca97a8
commit
8102b75ee8
@ -57,6 +57,8 @@
|
|||||||
# include <qt_windows.h> // for SetFileAttributes
|
# include <qt_windows.h> // for SetFileAttributes
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#define WAITTIME 1000
|
#define WAITTIME 1000
|
||||||
|
|
||||||
// Will try to wait for the condition while allowing event processing
|
// Will try to wait for the condition while allowing event processing
|
||||||
@ -710,8 +712,8 @@ void tst_QFileSystemModel::filters()
|
|||||||
for (int i = 0; i < rowCount; ++i)
|
for (int i = 0; i < rowCount; ++i)
|
||||||
modelEntries.append(model->data(model->index(i, 0, root), QFileSystemModel::FileNameRole).toString());
|
modelEntries.append(model->data(model->index(i, 0, root), QFileSystemModel::FileNameRole).toString());
|
||||||
|
|
||||||
qSort(dirEntries);
|
std::sort(dirEntries.begin(), dirEntries.end());
|
||||||
qSort(modelEntries);
|
std::sort(modelEntries.begin(), modelEntries.end());
|
||||||
QCOMPARE(dirEntries, modelEntries);
|
QCOMPARE(dirEntries, modelEntries);
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include "private/qapplication_p.h"
|
#include "private/qapplication_p.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
#define VERIFY_SPANS_CONSISTENCY(TEST_VIEW_) \
|
#define VERIFY_SPANS_CONSISTENCY(TEST_VIEW_) \
|
||||||
QVERIFY(static_cast<QTableViewPrivate*>(QObjectPrivate::get(TEST_VIEW_))->spans.checkConsistency())
|
QVERIFY(static_cast<QTableViewPrivate*>(QObjectPrivate::get(TEST_VIEW_))->spans.checkConsistency())
|
||||||
@ -3921,8 +3923,8 @@ void tst_QTableView::task234926_setHeaderSorting()
|
|||||||
data << "orange" << "apple" << "banana" << "lemon" << "pumpkin";
|
data << "orange" << "apple" << "banana" << "lemon" << "pumpkin";
|
||||||
QStringList sortedDataA = data;
|
QStringList sortedDataA = data;
|
||||||
QStringList sortedDataD = data;
|
QStringList sortedDataD = data;
|
||||||
qSort(sortedDataA);
|
std::sort(sortedDataA.begin(), sortedDataA.end());
|
||||||
qSort(sortedDataD.begin(), sortedDataD.end(), qGreater<QString>());
|
std::sort(sortedDataD.begin(), sortedDataD.end(), qGreater<QString>());
|
||||||
model.setStringList(data);
|
model.setStringList(data);
|
||||||
QTableView view;
|
QTableView view;
|
||||||
view.setModel(&model);
|
view.setModel(&model);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user