summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-08-01 18:34:45 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-03 07:35:00 +0000
commit9019e177940959700175b55314372d92e35909d4 (patch)
treed8ecc93d3c1db4b993baf9525421d637bc949756
parentf608e39c727af6ca94ffb3662e71f218aac11080 (diff)
qUtf16Printable: avoid creating a copy of a QString
Amends daa7f5375c58464bbe92744599f1e2258445e259. Change-Id: I569efc4556341bfbce452bdf169c50a3b4be9ca7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 357db9ceabddcdce95ee1bc7f534eb00e6e10bad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/global/qglobal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 43e4c3fe57..c7b5fb3255 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -955,7 +955,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;