From 1df45820d4ccbb67b9ad0f3eed167342f2917cf8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 23 Sep 2016 14:20:16 +0200 Subject: doc: Document two undocumented functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change provides missing documentation for two member functions of QString. QString QString::fromUtf16(const char16_t *str, int size) QString QString::fromUcs4(const char32_t *str, int size) Change-Id: I94a9437a457062e49e4457f5876e4d7c31fff24c Reviewed-by: André Hartmann Reviewed-by: Topi Reiniö --- src/corelib/tools/qstring.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index b7f83e4b9d..645d213d82 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -4818,6 +4818,39 @@ QString QString::fromUtf16(const ushort *unicode, int size) return QUtf16::convertToUnicode((const char *)unicode, size*2, 0); } +/*! + \fn QString QString::fromUtf16(const char16_t *str, int size) + \since 5.3 + + Returns a QString initialized with the first \a size characters + of the Unicode string \a str (ISO-10646-UTF-16 encoded). + + If \a size is -1 (default), \a str must be terminated + with a 0. + + This function checks for a Byte Order Mark (BOM). If it is missing, + host byte order is assumed. + + This function is slow compared to the other Unicode conversions. + Use QString(const QChar *, int) or QString(const QChar *) if possible. + + QString makes a deep copy of the Unicode data. + + \sa utf16(), setUtf16(), fromStdU16String() +*/ + +/*! + \fn QString QString::fromUcs4(const char32_t *str, int size) + \since 5.3 + + Returns a QString initialized with the first \a size characters + of the Unicode string \a str (ISO-10646-UCS-4 encoded). + + If \a size is -1 (default), \a str must be terminated + with a 0. + + \sa toUcs4(), fromUtf16(), utf16(), setUtf16(), fromWCharArray(), fromStdU32String() +*/ /*! \since 4.2 -- cgit v1.2.3