summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-12 19:39:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-12 19:39:55 (GMT)
commit0c1e85db7e810e5ac7496dd5fb4c0bd37746be11 (patch)
tree646f68d3e04b4f770c59e934e4e8fe82b507bccb /tests/auto
parentdfb0f8600187b44c3a3e10ef40ae2733de88f241 (diff)
parent92fb7e405a93785af162e5dff0a6b2a2d40060bc (diff)
downloadQt-0c1e85db7e810e5ac7496dd5fb4c0bd37746be11.zip
Qt-0c1e85db7e810e5ac7496dd5fb4c0bd37746be11.tar.gz
Qt-0c1e85db7e810e5ac7496dd5fb4c0bd37746be11.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Optimize QFontEngineS60::recalcAdvances() Delete qtdemoapps.iby. Added bearer plugin deployment to qt.iby Implement QFontEngineS60::emSquareSize() Remove unnecessary calls to GetHorizBounds() + boundingBox() Fix memory leak in QFontEngineS60::addGlyphsToPath() Fix for CFbsBitmap to QPixmap conversion.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 24cbb21..fdf8311 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -1160,6 +1160,8 @@ void tst_QPixmap::fromSymbianCFbsBitmap_data()
const int smallHeight = 20;
const int largeWidth = 240;
const int largeHeight = 320;
+ const int notAlignedWidth = 250;
+ const int notAlignedHeight = 250;
// Indexed Color Formats - Disabled since images seem to be blank -> no palette?
// QTest::newRow("EGray2 small") << EGray2 << smallWidth << smallHeight << QColor(Qt::black);
@@ -1172,14 +1174,19 @@ void tst_QPixmap::fromSymbianCFbsBitmap_data()
// Direct Color Formats
QTest::newRow("EColor4K small") << EColor4K << smallWidth << smallHeight << QColor(Qt::red);
QTest::newRow("EColor4K big") << EColor4K << largeWidth << largeHeight << QColor(Qt::red);
+ QTest::newRow("EColor4K not aligned") << EColor4K << notAlignedWidth << notAlignedHeight << QColor(Qt::red);
QTest::newRow("EColor64K small") << EColor64K << smallWidth << smallHeight << QColor(Qt::green);
QTest::newRow("EColor64K big") << EColor64K << largeWidth << largeHeight << QColor(Qt::green);
+ QTest::newRow("EColor64K not aligned") << EColor64K << notAlignedWidth << notAlignedHeight << QColor(Qt::green);
QTest::newRow("EColor16M small") << EColor16M << smallWidth << smallHeight << QColor(Qt::yellow);
QTest::newRow("EColor16M big") << EColor16M << largeWidth << largeHeight << QColor(Qt::yellow);
+ QTest::newRow("EColor16M not aligned") << EColor16M << notAlignedWidth << notAlignedHeight << QColor(Qt::yellow);
QTest::newRow("EColor16MU small") << EColor16MU << smallWidth << smallHeight << QColor(Qt::red);
QTest::newRow("EColor16MU big") << EColor16MU << largeWidth << largeHeight << QColor(Qt::red);
+ QTest::newRow("EColor16MU not aligned") << EColor16MU << notAlignedWidth << notAlignedHeight << QColor(Qt::red);
QTest::newRow("EColor16MA small opaque") << EColor16MA << smallWidth << smallHeight << QColor(255, 255, 0);
QTest::newRow("EColor16MA big opaque") << EColor16MA << largeWidth << largeHeight << QColor(255, 255, 0);
+ QTest::newRow("EColor16MA not aligned opaque") << EColor16MA << notAlignedWidth << notAlignedHeight << QColor(255, 255, 0);
// Semi-transparent Colors - Disabled for now, since the QCOMPARE fails, but visually confirmed to work
// QTest::newRow("EColor16MA small semi") << EColor16MA << smallWidth << smallHeight << QColor(255, 255, 0, 127);
@@ -1237,6 +1244,10 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
QColor actualColor(image.pixel(1, 1));
QCOMPARE(actualColor, color);
+
+ QImage shouldBe(pixmap.width(), pixmap.height(), image.format());
+ shouldBe.fill(color.rgba());
+ QCOMPARE(image, shouldBe);
}
__UHEAP_MARKEND;