From 85a77cd5c8f4a9a2e71676ff7b600ba891983115 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 19 Dec 2011 15:22:51 +1000 Subject: Retire QTest::pixmapsAreEqual(). QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with some old tests written for Qt3. QCOMPARE() is the preferred way to compare QPixmaps and provides superior diagnostic output when a comparison fails. This commit removes QTest::pixmapsAreEqual() from the testlib API and replaces the last few remaining calls with QCOMPARE. Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b Reviewed-by: Lars Knoll --- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/widgets/styles') diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 5dede997ae..d5849f1c2c 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -273,7 +273,7 @@ void tst_QStyle::drawItemPixmap() QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG"); QPixmap actualPix = QPixmap::grabWidget(testWidget); - QVERIFY(pixmapsAreEqual(&actualPix,&p)); + QCOMPARE(actualPix, p); testWidget->hide(); } @@ -458,7 +458,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap) QImage oldFile = readImage(filename); QPixmap oldPixmap = QPixmap::fromImage(oldFile); if (!oldFile.isNull()) - QVERIFY(pixmapsAreEqual(&pixmap, &oldPixmap)); + QCOMPARE(pixmap, oldPixmap); else writeImage(filename, pixmap.toImage()); } -- cgit v1.2.3