summaryrefslogtreecommitdiffstats
path: root/src/tools/tracegen/ctf.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2023-01-24 14:29:27 +0100
committerQt Cherry-pick Bot <[email protected]>2023-01-25 08:46:24 +0000
commite69e111a39e423627b31e4deaabda87ca01ed918 (patch)
tree867028f8812d6466b3379cd2929b5ec14ba6e62f /src/tools/tracegen/ctf.cpp
parent6eee1809462d132da2b68c32df21860a15f8fb62 (diff)
ODBC SQL driver: deal with different sizes of SQLTCHAR correctly
Neither the UTF-32, nor the UTF-8 recoding of a UTF-16 string is necessarily of the same length as the input. The UTF-32 version may be shorter, if surrogate pairs were encountered. The UTF-8 version will be longer whenever the string contains non-US-ASCII characters. Split toSQLTCHAR() into three functions, templated on sizeof(SQLTCHAR), and use QVLA's range-append instead of manual memcpy()s. This patch specifically doesn't use constexpr-if, as that's not available until C++17, which Qt 5 doesn't require. Change-Id: I0bfcb66eb321598908ef00ac34c888fdbccf9316 Reviewed-by: Christian Ehrlicher <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit 66767eea46bea0f19f8ae5ad6ebc641d86867701) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
Diffstat (limited to 'src/tools/tracegen/ctf.cpp')
0 files changed, 0 insertions, 0 deletions