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 <Friedemann.Kleint@qt.io>
bb10
Marc Mutz 2021-07-06 09:25:36 +02:00
parent 434ada8dcb
commit cbf07134a7
1 changed files with 1 additions and 1 deletions

View File

@ -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,