summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-29 12:07:28 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-01 12:59:15 (GMT)
commit45591e13862963fb29c13e0c5bfe39330883c579 (patch)
treee409d41c84348123fddd04b2ef065eaf75e6fa4b /src/corelib
parent984689f01ce31cade5452633dd43f676bdb75b73 (diff)
downloadQt-45591e13862963fb29c13e0c5bfe39330883c579.zip
Qt-45591e13862963fb29c13e0c5bfe39330883c579.tar.gz
Qt-45591e13862963fb29c13e0c5bfe39330883c579.tar.bz2
document QString::fromUtf16() slowness
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qstring.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index b9dd4d1..44e4d16 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -3857,6 +3857,12 @@ QString QString::fromUtf8(const char *str, int size)
If \a size is -1 (default), \a unicode 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 comparatively slow.
+ Use QString(const ushort *, int) if possible.
+
QString makes a deep copy of the Unicode data.
\sa utf16(), setUtf16()
@@ -3923,6 +3929,9 @@ QString& QString::setUnicode(const QChar *unicode, int size)
If \a unicode is 0, nothing is copied, but the string is still
resized to \a size.
+ Note that unlike fromUtf16(), this function does not consider BOMs and
+ possibly differing byte ordering.
+
\sa utf16(), setUnicode()
*/
@@ -4669,6 +4678,8 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
Returns the QString as a '\\0\'-terminated array of unsigned
shorts. The result remains valid until the string is modified.
+ The returned string is in host byte order.
+
\sa unicode()
*/