qt5base-lts/tests/auto/corelib/tools/qstring
Marc Mutz 1005b7a0de Long live qUtf16Printable()
QString::asprintf() has the ability to take a ushort* array as
obtained from QString::utf16() and insert that into the output
with an %ls conversion.

But no-one ever used this, because just passing QString::utf16()
to QString::asprintf() creates a warning about wchar_t* expected,
but ushort* provided.

The new qUtf16Printable() macro adds the necessary casts (via void*
to prevent any "type-punned pointer" warnings) to make
passing QString::utf16() to QString::asprintf() work silently.

This should greatly reduce the need to do a round-trip via utf-8
just to print the contents of a QString.

[ChangeLog][QtCore] Added qUtf16Printable().

Change-Id: I7ddd8d2b2a2191c9faa26aca95d49850d94b287c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-21 14:25:55 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
double_data.h Update copyright headers 2015-02-11 06:49:51 +00:00
qstring.pro Replace qdtoa and qstrtod implementation by a 3rdparty library 2015-11-02 17:00:50 +00:00
tst_qstring_mac.mm Add shared implementation of a NSAutoreleasePool wrapper to qglobal 2015-05-27 18:45:29 +00:00
tst_qstring.cpp Long live qUtf16Printable() 2015-11-21 14:25:55 +00:00