From 579526cfec082679241548a0fca1ff9ba2c350a7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Jan 2014 16:03:30 -0800 Subject: Make the printing of complex Unicode in a QString prettier This also has the advantage of not requiring the use of the locale codec. Quite an advantage if you're debugging the locale codec. But it's mostly so that we don't get question marks that hide the difference we were trying to locate. [ChangeLog][QtTest] QtTest now prints an escaped version of QStrings that failed to compare with QCOMPARE. That is, instead of converting non-printable characters to question marks, QtTest will print the Unicode representation of the character in question. Change-Id: I44c1ef3246b188c913dacd3ca4df02581356ea41 Reviewed-by: Lars Knoll --- src/testlib/qtestcase.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/testlib/qtestcase.h') diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index 05da33c400..b715d83383 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -233,6 +233,7 @@ namespace QTest Q_TESTLIB_EXPORT char *toHexRepresentation(const char *ba, int length); + Q_TESTLIB_EXPORT char *toPrettyUnicode(const ushort *unicode, int length); Q_TESTLIB_EXPORT char *toString(const char *); Q_TESTLIB_EXPORT char *toString(const void *); -- cgit v1.2.3