qUtf16Printable: avoid creating a copy of a QString

Amends daa7f5375c.

Change-Id: I569efc4556341bfbce452bdf169c50a3b4be9ca7
Pick-to: 6.4 6.3 6.2 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Sona Kurazyan 2022-08-01 18:34:45 +02:00
parent 777c7a2288
commit 357db9ceab

View File

@ -648,7 +648,7 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept;
*/
#ifndef qUtf16Printable
# define qUtf16Printable(string) \
static_cast<const wchar_t*>(static_cast<const void*>(QString(string).utf16()))
static_cast<const wchar_t*>(static_cast<const void*>(QtPrivate::asString(string).utf16()))
#endif
class QString;