summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-08 09:58:52 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-08 10:01:50 +0100
commit9d50df5511e7919d9e03e5f70c693d36af8204f2 (patch)
treee1e62848dac6297784646666afaee65cb0867545 /src/corelib/tools/qstring.cpp
parent969bb10eed646313209fcdd9b84605aa98fc88de (diff)
parente918605f4238841596a1723a0a8592ec152dc723 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/corelib/tools/qalgorithms.h Change-Id: Ib8ce4d5d9ecd5b9c166d5b8b44e58f3e4e7283ff
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 27d8c14583..8520bb5740 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -4814,6 +4814,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