summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-12-19 15:22:51 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-20 06:17:42 +0100
commit85a77cd5c8f4a9a2e71676ff7b600ba891983115 (patch)
tree42757b4bcd9b8f9702e11fbf70e8ad573d49d1b2 /tests/auto/widgets/styles
parent1749fef3c5c1dda98c6ea32e0ac17202892fc9fe (diff)
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 <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp4
1 files changed, 2 insertions, 2 deletions
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());
}