summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2025-12-18 09:20:13 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-12-18 13:52:17 +0000
commit2bb047e26883892b829f7f89e7483f02f3adcea2 (patch)
treefb699887840374253c45b372b0673621ae14ae7c /src
parent830a70ff96c9d8e4dcfc72568902e9c74ab0639d (diff)
Export QUtf8::convertFromUnicode API to be accessible from other modules6.11
With std::codecvt_utf8_utf16 deprecated as of C++17, modules (such as ohos plugin) need an alternative for UTF-8/UTF-16 conversion. While QUtf8::convertFromUnicode provides this functionality, it is not currently exported. This patch resolves this issue by exporting the API for use in other modules. Amends 3b73bc463db1407096941239170040a2692ecdac. Pick-to: 6.10 Task-number: QT6HAROS-29 Change-Id: I8b33c107bc112e79e37ecf889d34980a6f2b9433 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 6966fb14b567d12e0c0d5943463c7b5d1dc743f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qstringconverter_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/text/qstringconverter_p.h b/src/corelib/text/qstringconverter_p.h
index 3ac60ce8c70..3923c2f302f 100644
--- a/src/corelib/text/qstringconverter_p.h
+++ b/src/corelib/text/qstringconverter_p.h
@@ -334,6 +334,7 @@ struct QUtf8
static char16_t *convertToUnicode(char16_t *dst, QByteArrayView in, QStringConverter::State *state);
+ Q_CORE_EXPORT
static char *convertFromUnicode(char *dst, QStringView in) noexcept;
Q_CORE_EXPORT static QByteArray convertFromUnicode(QStringView in);
Q_CORE_EXPORT static QByteArray convertFromUnicode(QStringView in, QStringConverter::State *state);