summaryrefslogtreecommitdiff
path: root/src/testlib/qtest_gui.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-04-23 08:33:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-28 09:34:06 +0200
commit049fa03c2f8c52e88bf5c5d205beddc92784c0c2 (patch)
tree3e992e47fdcbdef17f6ed01b1f23e3e17c612b00 /src/testlib/qtest_gui.h
parent3e6e70bddd84536deaae69421d05785ae6ce28cd (diff)
downloadqtbase-049fa03c2f8c52e88bf5c5d205beddc92784c0c2.tar.gz
Check the right object's height in qCompare for QImage and QPixmap.
Fixes http://www.viva64.com/en/b/0251/, Typo No. 3 and 4 Change-Id: Icbd33534dbf424e00e4c351ae5ee0e3daa99e7b9 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/testlib/qtest_gui.h')
-rw-r--r--src/testlib/qtest_gui.h4
1 files changed, 2 insertions, 2 deletions
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",