From 049fa03c2f8c52e88bf5c5d205beddc92784c0c2 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 23 Apr 2014 08:33:33 +0200 Subject: Check the right object's height in qCompare for QImage and QPixmap. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes http://www.viva64.com/en/b/0251/, Typo No. 3 and 4 Change-Id: Icbd33534dbf424e00e4c351ae5ee0e3daa99e7b9 Reviewed-by: Jørgen Lind --- src/testlib/qtest_gui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index a9ac7777c3..7c68b0fd77 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -98,7 +98,7 @@ inline bool qCompare(QImage const &t1, QImage const &t2, } if (t1Null && t2Null) return compare_helper(true, 0, 0, 0, actual, expected, file, line); - if (t1.width() != t2.width() || t2.height() != t2.height()) { + if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QImages differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", @@ -132,7 +132,7 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c } if (t1Null && t2Null) return compare_helper(true, 0, 0, 0, actual, expected, file, line); - if (t1.width() != t2.width() || t2.height() != t2.height()) { + if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QPixmaps differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", -- cgit v1.2.3