Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt_allow_non_utf8_sources.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-allow-non-utf8-sources.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_allow_non_utf8_sources
9
\keyword qt6_allow_non_utf8_sources
10
11
\summary {Prevents forcing source files to be treated as UTF-8 for Windows.}
12
13
\include cmake-find-package-core.qdocinc
14
15
\cmakecommandsince 6.0
16
17
\section1 Synopsis
18
19
\badcode
20
qt_allow_non_utf8_sources(target)
21
\endcode
22
23
\versionlessCMakeCommandsNote qt6_allow_non_utf8_sources()
24
25
\section1 Description
26
27
When building with some compilers for Windows, targets that link to a Qt library
28
will use flags that force the compiler to treat its source files as UTF-8. This
29
is currently implemented for Visual Studio and Intel compilers. You can disable
30
this behavior on a per-target basis by calling \c{qt_allow_non_utf8_sources()}
31
and passing the target as the argument.
32
33
\note This does not change the runtime behavior of classes like
34
\l QString (its constructor from \c{const char *} requires properly encoded
35
UTF-8 input). Use the \l QT_NO_CAST_FROM_ASCII and
36
\c QT_RESTRICTED_CAST_FROM_ASCII macros to help identify such code.
37
38
\sa {qt6_disable_unicode_defines}{qt_disable_unicode_defines()}
39
{cmake-target-property-QT_NO_UTF8_SOURCE}
40
*/
qtbase
src
corelib
doc
src
cmake
qt_allow_non_utf8_sources.qdoc
Generated on
for Qt by
1.14.0