summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-09-29 14:28:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-08 22:25:50 +0000
commit7c401397a4ce6c00652306204c9f8477040a5400 (patch)
treed73ec11b728a249399a0ce8860eb4dc001d8e07e /tests
parent7a93d98f29fca9f1610f3b61b055535916903500 (diff)
Cleanup memrotate functions
Throw out unused code and simply format table to only care about bpp and use it consistently for all bpp. Also makes QImage use the 180 degree memrotate, and fixes the tiled packed qt_memrotate270 so it can be put to use. Change-Id: If4ef1666fca960ce8e4ce32d85dc5f347b6986f4 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index a1ab812aaa..9b5477a06a 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -1087,35 +1087,11 @@ void tst_QImage::rotate_data()
degrees << 0 << 90 << 180 << 270;
foreach (int d, degrees) {
- const QByteArray dB = QByteArray::number(d);
- QTest::newRow((dB + " Format_RGB32").constData())
- << QImage::Format_RGB32 << d;
- QTest::newRow((dB + " Format_ARGB32").constData())
- << QImage::Format_ARGB32 << d;
- QTest::newRow((dB + " Format_ARGB32_Premultiplied").constData())
- << QImage::Format_ARGB32_Premultiplied << d;
- QTest::newRow((dB + " Format_RGB16").constData())
- << QImage::Format_RGB16 << d;
- QTest::newRow((dB + " Format_ARGB8565_Premultiplied").constData())
- << QImage::Format_ARGB8565_Premultiplied << d;
- QTest::newRow((dB + " Format_RGB666").constData())
- << QImage::Format_RGB666 << d;
- QTest::newRow((dB + " Format_RGB555").constData())
- << QImage::Format_RGB555 << d;
- QTest::newRow((dB + " Format_ARGB8555_Premultiplied").constData())
- << QImage::Format_ARGB8555_Premultiplied << d;
- QTest::newRow((dB + " Format_RGB888").constData())
- << QImage::Format_RGB888 << d;
- QTest::newRow((dB + " Format_Indexed8").constData())
- << QImage::Format_Indexed8 << d;
- QTest::newRow((dB + " Format_RGBX8888").constData())
- << QImage::Format_RGBX8888 << d;
- QTest::newRow((dB + " Format_RGBA8888_Premultiplied").constData())
- << QImage::Format_RGBA8888_Premultiplied << d;
- QTest::newRow((dB + " Format_Alpha8").constData())
- << QImage::Format_Alpha8 << d;
- QTest::newRow((dB + " Format_Grayscale8").constData())
- << QImage::Format_Grayscale8 << d;
+ const QString dB = QString::number(d);
+ for (int i = QImage::Format_Indexed8; i < QImage::NImageFormats; i++) {
+ QImage::Format format = static_cast<QImage::Format>(i);
+ QTest::newRow(qPrintable(dB + " " + formatToString(format))) << format << d;
+ }
}
}