diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-19 15:22:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-20 06:17:42 +0100 |
commit | 85a77cd5c8f4a9a2e71676ff7b600ba891983115 (patch) | |
tree | 42757b4bcd9b8f9702e11fbf70e8ad573d49d1b2 /src/testlib | |
parent | 1749fef3c5c1dda98c6ea32e0ac17202892fc9fe (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 'src/testlib')
-rw-r--r-- | src/testlib/qtest_gui.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index 89f63e25c6..99b7700e3b 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -94,21 +94,6 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c } -/* compatibility */ - -inline static bool pixmapsAreEqual(const QPixmap *actual, const QPixmap *expected) -{ - if (!actual && !expected) - return true; - if (!actual || !expected) - return false; - if (actual->isNull() && expected->isNull()) - return true; - if (actual->isNull() || expected->isNull() || actual->size() != expected->size()) - return false; - return actual->toImage() == expected->toImage(); -} - #ifdef Q_WS_X11 extern void qt_x11_wait_for_window_manager(QWidget *w); #endif |