From cbf07134a792cf256e597d41159aeaccc671b3d6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 6 Jul 2021 09:25:36 +0200 Subject: [PATCH] QTest: there's no toString(QImage) ... so don't try to call it. The call resolves to a fall-back implementation of toString() that just returns nullptr, so we might as well pass nullptr directly, like three lines above, and not confuse readers of the code. Change-Id: I85d196aae7a0317050cfe16b206252df3fdffa2d Reviewed-by: Friedemann Kleint --- src/testlib/qtest_gui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index 3368febb87..eeec036437 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -186,7 +186,7 @@ inline bool qCompare(QImage const &t1, QImage const &t2, return compare_helper(false, msg, nullptr, nullptr, actual, expected, file, line); } return compare_helper(t1 == t2, "Compared values are not the same", - toString(t1), toString(t2), actual, expected, file, line); + nullptr, nullptr, actual, expected, file, line); } inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected,