summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:45:38 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:46:19 +0200
commitd671acd5b296b83440db9836a92189c501c87ff3 (patch)
treebd9c1a000e17c70124c207666cfb3276b5518ffd /tests/auto/qpixmap
parent42f5786104f9eef9542df2c7469a03324978281d (diff)
parent4f2138ecfbdc58e5cb5b0c7d762197ef69752957 (diff)
Merge remote branch 'staging/master' into refactor
Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/glxconvenience/qglxconvenience.cpp src/plugins/platforms/platforms.pro src/plugins/platforms/wayland/qwaylandwindow.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/plugins/platforms/xcb/qxcbwindowsurface.cpp src/widgets/kernel/qwidget_qpa.cpp tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'tests/auto/qpixmap')
-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();