qt5base-lts/tests/auto/corelib
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
..
animation qevent.h: Add fixme comments to remove include directives for Qt 6. 2015-10-02 06:37:03 +00:00
codecs Tests: Fix single-character string literals. 2015-10-13 18:14:27 +00:00
global Add {add,sub,mul}_overflow for signed integers. 2015-11-20 11:08:05 +00:00
io Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
itemmodels tests/auto/corelib: Remove some placeholder formatting. 2015-10-22 03:54:29 +00:00
json Add a file to the TESTDATA list 2015-11-16 16:14:11 +00:00
kernel tests/auto/corelib: Remove some placeholder formatting. 2015-10-22 03:54:29 +00:00
mimetypes Merge remote-tracking branch 'origin/5.6' into dev 2015-10-14 15:45:35 +02:00
plugin Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2015-11-05 08:27:56 +00:00
statemachine Merge remote-tracking branch 'origin/5.6' into dev 2015-11-04 20:18:14 +01:00
thread Merge remote-tracking branch 'origin/5.6' into dev 2015-11-04 20:18:14 +01:00
tools Long live qUtf16Printable() 2015-11-21 14:25:55 +00:00
xml tests/auto/corelib: Remove some placeholder formatting. 2015-10-22 03:54:29 +00:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00