Add the note about the runtime encoding in the QString-like classes and QT_NO_UTF8_SOURCE

Mention that QT_NO_UTF8_SOURCE has no effect on runtime encoding of
QString-like classes.

Amends 37e6159ab0c1456e8dc38f38f3b21643585c1273

Pick-to: 6.7 6.5
Task-number: QTBUG-126435
Change-Id: I3629b8af0e3eb7353c9268e23167dbef6802bb00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit bba0150200e16e6e0a8926dac1f32b00b8b1493b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2024-07-17 11:18:37 +02:00 committed by Qt Cherry-pick Bot
parent fc4a3a8cfc
commit 7b8cbbff76
2 changed files with 10 additions and 0 deletions

View File

@ -508,6 +508,11 @@ this behavior on a per-target basis by setting the property to \c TRUE:
set_property(TARGET target_name PROPERTY QT_NO_UTF8_SOURCE TRUE)
\endcode
\note This does not change the runtime behavior of classes like
\l QString (its constructor from \c{const char *} requires properly encoded
UTF-8 input). Use the \l QT_NO_CAST_FROM_ASCII and
\c QT_RESTRICTED_CAST_FROM_ASCII macros to help identify such code.
\sa {qt6_disable_unicode_defines}{qt_disable_unicode_defines()}{qt6_allow_non_utf8_sources()}
*/

View File

@ -30,6 +30,11 @@ is currently implemented for Visual Studio and Intel compilers. You can disable
this behavior on a per-target basis by calling \c{qt_allow_non_utf8_sources()}
and passing the target as the argument.
\note This does not change the runtime behavior of classes like
\l QString (its constructor from \c{const char *} requires properly encoded
UTF-8 input). Use the \l QT_NO_CAST_FROM_ASCII and
\c QT_RESTRICTED_CAST_FROM_ASCII macros to help identify such code.
\sa {qt6_disable_unicode_defines}{qt_disable_unicode_defines()}
{cmake-target-property-QT_NO_UTF8_SOURCE}
*/