diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-16 17:42:00 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-29 06:20:07 +0200 |
commit | 0fda43cf33cc7715f16d8764c4d96c6f88238712 (patch) | |
tree | c693c9ce99f1f02f8ec5de204cfe93bf1517b105 /tests/auto/gui/image | |
parent | 0303d8ddfa968e0c5a9ac08a12836ea3f34d4088 (diff) |
Remove deprecated members from QtGui/image classes
Cleaning up those that are trivial to remove because they have direct
replacements.
Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r-- | tests/auto/gui/image/qimage/tst_qimage.cpp | 28 | ||||
-rw-r--r-- | tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp | 7 | ||||
-rw-r--r-- | tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp | 30 |
3 files changed, 0 insertions, 65 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index fe998c7d92..9455e2b6e8 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -70,8 +70,6 @@ private slots: void setAlphaChannel_data(); void setAlphaChannel(); - void alphaChannel(); - void convertToFormat_data(); void convertToFormat(); void convertToFormatWithColorTable(); @@ -544,32 +542,6 @@ void tst_QImage::setAlphaChannel() } } QVERIFY(allPixelsOK); - - QImage outAlpha = image.alphaChannel(); - QCOMPARE(outAlpha.size(), image.size()); - - bool allAlphaOk = true; - for (int y=0; y<height; ++y) { - for (int x=0; x<width; ++x) { - allAlphaOk &= outAlpha.pixelIndex(x, y) == alpha; - } - } - QVERIFY(allAlphaOk); - -} - -void tst_QImage::alphaChannel() -{ - QImage img(10, 10, QImage::Format_Mono); - img.setColor(0, Qt::transparent); - img.setColor(1, Qt::black); - img.fill(0); - - QPainter p(&img); - p.fillRect(2, 2, 6, 6, Qt::black); - p.end(); - - QCOMPARE(img.alphaChannel(), img.convertToFormat(QImage::Format_ARGB32).alphaChannel()); } void tst_QImage::convertToFormat_data() diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index 247f6443c1..b76ccf3ed0 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -146,13 +146,6 @@ void tst_QImageWriter::getSetCheck() QCOMPARE(INT_MIN, obj1.compression()); obj1.setCompression(INT_MAX); QCOMPARE(INT_MAX, obj1.compression()); - - // float QImageWriter::gamma() - // void QImageWriter::setGamma(float) - obj1.setGamma(0.0f); - QCOMPARE(0.0f, obj1.gamma()); - obj1.setGamma(1.1f); - QCOMPARE(1.1f, obj1.gamma()); } void tst_QImageWriter::writeImage_data() diff --git a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp index 3158883ef5..da0ab4c6e0 100644 --- a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp +++ b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp @@ -107,24 +107,15 @@ void tst_QPixmapCache::setCacheLimit() QPixmap res; QPixmap *p1 = new QPixmap(2, 3); QPixmapCache::insert("P1", *p1); -#if QT_DEPRECATED_SINCE(5, 13) - QVERIFY(QPixmapCache::find("P1") != 0); -#endif QVERIFY(QPixmapCache::find("P1", &res)); delete p1; QPixmapCache::setCacheLimit(0); -#if QT_DEPRECATED_SINCE(5, 13) - QVERIFY(!QPixmapCache::find("P1")); -#endif QVERIFY(!QPixmapCache::find("P1", &res)); p1 = new QPixmap(2, 3); QPixmapCache::setCacheLimit(1000); QPixmapCache::insert("P1", *p1); -#if QT_DEPRECATED_SINCE(5, 13) - QVERIFY(QPixmapCache::find("P1") != 0); -#endif QVERIFY(QPixmapCache::find("P1", &res)); delete p1; @@ -210,17 +201,6 @@ void tst_QPixmapCache::find() QVERIFY(QPixmapCache::insert("P1", p1)); QPixmap p2; -#if QT_DEPRECATED_SINCE(5, 13) - QVERIFY(QPixmapCache::find("P1", p2)); - QCOMPARE(p2.width(), 10); - QCOMPARE(p2.height(), 10); - QCOMPARE(p1, p2); - - // obsolete - QPixmap *p3 = QPixmapCache::find("P1"); - QVERIFY(p3); - QCOMPARE(p1, *p3); -#endif QVERIFY(QPixmapCache::find("P1", &p2)); QCOMPARE(p2.width(), 10); @@ -278,16 +258,6 @@ void tst_QPixmapCache::insert() } int num = 0; -#if QT_DEPRECATED_SINCE(5, 13) - for (int k = 0; k < numberOfKeys; ++k) { - if (QPixmapCache::find(QString::number(k))) - ++num; - } - - if (QPixmapCache::find("0")) - ++num; - num = 0; -#endif QPixmap res; for (int k = 0; k < numberOfKeys; ++k) { if (QPixmapCache::find(QString::number(k), &res)) |