diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 10:04:16 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-25 10:13:12 +0200 |
commit | d1612610e650ffd7f2fbdef535c431647f57f0ac (patch) | |
tree | 6545a46b6aa7e5f89d7b2abcb959a78fa4c114ed /tests/auto/gui/image | |
parent | 8cd3ec4ee43365425be584a48ff2871bd0090ef8 (diff) |
Use QList instead of QVector in gui tests
Task-number: QTBUG-84469
Change-Id: Ia86f39597de418dde6cd9ae3170ef919bd27416a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r-- | tests/auto/gui/image/qimage/tst_qimage.cpp | 16 | ||||
-rw-r--r-- | tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index f9e94d826c..c9c5b5b201 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -986,7 +986,7 @@ void tst_QImage::convertToFormat() void tst_QImage::convertToFormatWithColorTable() { - QVector<QRgb> colors(2); + QList<QRgb> colors(2); colors[0] = 0xFF000000; colors[1] = 0xFFFFFFFF; for (int format = QImage::Format_RGB32; format < QImage::Format_Alpha8; ++format) { @@ -1129,7 +1129,7 @@ void tst_QImage::rotate_data() QTest::addColumn<QImage::Format>("format"); QTest::addColumn<int>("degrees"); - QVector<int> degrees; + QList<int> degrees; degrees << 0 << 90 << 180 << 270; foreach (int d, degrees) { @@ -1481,7 +1481,7 @@ void tst_QImage::convertToFormatPreserveText() QCOMPARE(imgResult1.text(), result); QCOMPARE(imgResult1.textKeys(), listResult); - QVector<QRgb> colorTable(4); + QList<QRgb> colorTable(4); for (int i = 0; i < 4; ++i) colorTable[i] = QRgb(42); QImage imgResult2 = img.convertToFormat(QImage::Format_MonoLSB, @@ -2187,7 +2187,7 @@ void tst_QImage::compareIndexed() { QImage img(256, 1, QImage::Format_Indexed8); - QVector<QRgb> colorTable(256); + QList<QRgb> colorTable(256); for (int i = 0; i < 256; ++i) colorTable[i] = qRgb(i, i, i); img.setColorTable(colorTable); @@ -2197,7 +2197,7 @@ void tst_QImage::compareIndexed() } QImage imgInverted(256, 1, QImage::Format_Indexed8); - QVector<QRgb> invertedColorTable(256); + QList<QRgb> invertedColorTable(256); for (int i = 0; i < 256; ++i) invertedColorTable[255-i] = qRgb(i, i, i); imgInverted.setColorTable(invertedColorTable); @@ -2290,7 +2290,7 @@ void tst_QImage::fillColor() QImage image(1, 1, format); if (image.depth() == 8) { - QVector<QRgb> table; + QList<QRgb> table; table << 0xff000000; table << 0xffffffff; table << 0xffff0000; @@ -2401,7 +2401,7 @@ void tst_QImage::rgbSwapped() QImage image(100, 1, format); image.fill(0); - QVector<QColor> testColor(image.width()); + QList<QColor> testColor(image.width()); for (int i = 0; i < image.width(); ++i) testColor[i] = QColor(i, 10 + i, 20 + i * 2, 30 + i); @@ -2569,7 +2569,7 @@ void tst_QImage::inplaceRgbSwapped() QImage image(64, 1, format); image.fill(0); - QVector<QRgb> testColor(image.width()); + QList<QRgb> testColor(image.width()); for (int i = 0; i < image.width(); ++i) testColor[i] = qRgb(i * 2, i * 3, 255 - i * 4); diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index b76ccf3ed0..ea11768a4b 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -47,7 +47,7 @@ #include <algorithm> typedef QMap<QString, QString> QStringMap; -typedef QVector<int> QIntList; +typedef QList<int> QIntList; Q_DECLARE_METATYPE(QImageWriter::ImageWriterError) Q_DECLARE_METATYPE(QImage::Format) |