Go to file
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
bin make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00
config.tests Merge remote-tracking branch 'origin/5.6' into dev 2015-11-04 20:18:14 +01:00
dist Update the Qt 5.5.1 changelog for qtbase 2015-09-23 06:49:28 +00:00
doc Doc: Use a navigation separator in the simple offline template 2015-10-28 11:55:05 +00:00
examples Fixed memory leaks in the "40000 chips" example. 2015-11-19 11:30:50 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
qmake Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
src Long live qUtf16Printable() 2015-11-21 14:25:55 +00:00
tests Long live qUtf16Printable() 2015-11-21 14:25:55 +00:00
tools Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
util Move CasexTraits from qstring.cpp to qunicodetables_p.h 2015-11-16 14:34:04 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Merge remote-tracking branch 'origin/5.6' into dev 2015-10-23 14:45:03 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
configure.bat Move the official Qt version from qglobal.h to .qmake.conf 2015-10-14 20:12:57 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
sync.profile make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00