summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap/tst_qpixmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qpixmap/tst_qpixmap.cpp')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp56
1 files changed, 2 insertions, 54 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 1f1ee88b23..216ca9b7c8 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -164,11 +164,6 @@ private slots:
void copy();
void depthOfNullObjects();
-#ifdef QT3_SUPPORT
- void resize();
- void resizePreserveMask();
-#endif
-
void transformed();
void transformed2();
@@ -1427,53 +1422,6 @@ void tst_QPixmap::copy()
QVERIFY(pixmapsAreEqual(&trans, &transCopy));
}
-#ifdef QT3_SUPPORT
-void tst_QPixmap::resize()
-{
- QPixmap p1(10, 10);
- p1.fill(Qt::red);
-
- QPixmap p2 = p1;
- QPixmap p3(50, 50);
- p3.fill(Qt::red);
-
- p1.resize(p3.size());
- p1.resize(p2.size());
- p3.resize(p2.size());
- QCOMPARE(p1.toImage(), p2.toImage());
- QCOMPARE(p1.toImage(), p3.toImage());
-
- QBitmap b1;
- b1.resize(10, 10);
- QVERIFY(b1.depth() == 1);
- QPixmap p4;
- p4.resize(10, 10);
- QVERIFY(p4.depth() != 0);
-}
-
-void tst_QPixmap::resizePreserveMask()
-{
- QPixmap pm(100, 100);
- pm.fill(Qt::transparent);
- QPainter p(&pm);
- p.fillRect(10, 10, 80, 80, Qt::red);
- p.drawRect(0, 0, 99, 99);
- p.end();
-
- QBitmap mask = pm.mask();
- pm.resize(50, 50);
-
- QCOMPARE(pm.mask().toImage(), mask.toImage().copy(0, 0, 50, 50));
-
- pm = QPixmap(100, 100);
- pm.fill(Qt::red);
- pm.setMask(mask);
- pm.resize(50, 50);
-
- QCOMPARE(pm.mask().toImage(), mask.toImage().copy(0, 0, 50, 50));
-}
-#endif
-
void tst_QPixmap::depthOfNullObjects()
{
QBitmap b1;
@@ -1697,8 +1645,8 @@ void tst_QPixmap::fromImageReaderAnimatedGif()
QImageReader referenceReader(path);
QImageReader pixmapReader(path);
- Q_ASSERT(referenceReader.canRead());
- Q_ASSERT(referenceReader.imageCount() > 1);
+ QVERIFY(referenceReader.canRead());
+ QVERIFY(referenceReader.imageCount() > 1);
for (int i = 0; i < referenceReader.imageCount(); ++i) {
QImage refImage = referenceReader.read();