summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qalgorithms.h4
-rw-r--r--src/corelib/tools/qstring.cpp33
2 files changed, 37 insertions, 0 deletions
diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h
index 4f704d6764..e7caa5c312 100644
--- a/src/corelib/tools/qalgorithms.h
+++ b/src/corelib/tools/qalgorithms.h
@@ -42,6 +42,10 @@
#include <QtCore/qglobal.h>
+#if defined(Q_CC_MSVC) && _MSC_VER > 1500
+#include <intrin.h>
+#endif
+
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 5ea4a0077b..ad44228039 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -4848,6 +4848,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