mirror of https://github.com/qt/qtbase.git
Remove qSort usages from gui tests
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Idf0fc471f8ab7b30a097d8faf93c93d5ebbb03ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
a01b7dad50
commit
170df5addb
|
@ -45,6 +45,8 @@
|
|||
#include <qicon.h>
|
||||
#include <qiconengine.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
class tst_QIcon : public QObject
|
||||
{
|
||||
|
@ -421,7 +423,7 @@ void tst_QIcon::availableSizes()
|
|||
|
||||
QList<QSize> availableSizes = icon.availableSizes();
|
||||
QCOMPARE(availableSizes.size(), 3);
|
||||
qSort(availableSizes.begin(), availableSizes.end(), sizeLess);
|
||||
std::sort(availableSizes.begin(), availableSizes.end(), sizeLess);
|
||||
QCOMPARE(availableSizes.at(0), QSize(32,32));
|
||||
QCOMPARE(availableSizes.at(1), QSize(64,64));
|
||||
QCOMPARE(availableSizes.at(2), QSize(128,128));
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#include <QTimer>
|
||||
#include <QTemporaryDir>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
typedef QList<int> QIntList;
|
||||
Q_DECLARE_METATYPE(QImage::Format)
|
||||
|
@ -559,7 +561,7 @@ void tst_QImageReader::supportedFormats()
|
|||
{
|
||||
QList<QByteArray> formats = QImageReader::supportedImageFormats();
|
||||
QList<QByteArray> sortedFormats = formats;
|
||||
qSort(sortedFormats);
|
||||
std::sort(sortedFormats.begin(), sortedFormats.end());
|
||||
|
||||
// check that the list is sorted
|
||||
QCOMPARE(formats, sortedFormats);
|
||||
|
@ -576,7 +578,7 @@ void tst_QImageReader::supportedMimeTypes()
|
|||
{
|
||||
QList<QByteArray> mimeTypes = QImageReader::supportedMimeTypes();
|
||||
QList<QByteArray> sortedMimeTypes = mimeTypes;
|
||||
qSort(sortedMimeTypes);
|
||||
std::sort(sortedMimeTypes.begin(), sortedMimeTypes.end());
|
||||
|
||||
// check that the list is sorted
|
||||
QCOMPARE(mimeTypes, sortedMimeTypes);
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
typedef QList<int> QIntList;
|
||||
Q_DECLARE_METATYPE(QImageWriter::ImageWriterError)
|
||||
|
@ -342,7 +344,7 @@ void tst_QImageWriter::supportedFormats()
|
|||
{
|
||||
QList<QByteArray> formats = QImageWriter::supportedImageFormats();
|
||||
QList<QByteArray> sortedFormats = formats;
|
||||
qSort(sortedFormats);
|
||||
std::sort(sortedFormats.begin(), sortedFormats.end());
|
||||
|
||||
// check that the list is sorted
|
||||
QCOMPARE(formats, sortedFormats);
|
||||
|
@ -359,7 +361,7 @@ void tst_QImageWriter::supportedMimeTypes()
|
|||
{
|
||||
QList<QByteArray> mimeTypes = QImageWriter::supportedMimeTypes();
|
||||
QList<QByteArray> sortedMimeTypes = mimeTypes;
|
||||
qSort(sortedMimeTypes);
|
||||
std::sort(sortedMimeTypes.begin(), sortedMimeTypes.end());
|
||||
|
||||
// check that the list is sorted
|
||||
QCOMPARE(mimeTypes, sortedMimeTypes);
|
||||
|
|
Loading…
Reference in New Issue