summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 3089cfef8b..75ef07a96e 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -9553,6 +9553,8 @@ float QStringRef::toFloat(bool *ok) const
*/
/*!
+ \since 5.0
+
Converts a plain text string to an HTML string with
HTML metacharacters \c{<}, \c{>}, \c{&}, and \c{"} replaced by HTML
entities.
@@ -9621,6 +9623,19 @@ QString QString::toHtmlEscaped() const
\code
if (attribute.name() == QLatin1String("http-contents-length")) //...
\endcode
+
+ \note There some restrictions when using the MSVC 2010 or 2012 compilers. The example snippets provided here
+ fail to compile with them.
+ \list
+ \li Concatenated string literals cannot be used with QStringLiteral.
+ \code
+ QString s = QStringLiteral("a" "b");
+ \endcode
+ \li QStringLiteral cannot be used to initialize lists or arrays of QString.
+ \code
+ QString a[] = { QStringLiteral("a"), QStringLiteral("b") };
+ \endcode
+ \endlist
*/
QT_END_NAMESPACE