summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-04-27 15:03:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-04-30 19:27:39 +0000
commit041cbe4b38fcd19212fec2af35140d947a3dac91 (patch)
tree7f5047c07fb99bdf773e19a0d3347ba605b889b3 /tests/auto/gui/image
parent68faf3a9bb496d655de575196b7070855ef096e0 (diff)
Add missing RGB32 <-> RGB30 convertions
Completes the inplace converters so that we can rely on inplace conversions to succede as long as the image depth is the same. Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index fa2aae6658..2931185c8b 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -2664,16 +2664,7 @@ void tst_QImage::inplaceRgbConversion()
QCOMPARE(qGreen(convertedColor) & 0xF0, i * 16);
}
}
- bool expectInplace = image.depth() == imageConverted.depth();
- // RGB30 <-> RGB32 have a few direct conversions without inplace counterparts.
- if (format >= QImage::Format_BGR30 && format <= QImage::Format_A2RGB30_Premultiplied
- && dest_format >= QImage::Format_RGB32 && dest_format <= QImage::Format_ARGB32_Premultiplied)
- expectInplace = false;
- if (dest_format >= QImage::Format_BGR30 && dest_format <= QImage::Format_A2RGB30_Premultiplied
- && format >= QImage::Format_RGB32 && format <= QImage::Format_ARGB32_Premultiplied)
- expectInplace = false;
-
- if (expectInplace)
+ if (image.depth() == imageConverted.depth())
QCOMPARE(imageConverted.constScanLine(0), originalPtr);
{