summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-06-05 16:42:58 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-06 13:19:52 +0200
commit7ec49393131461e07554f37042db16b5462a5565 (patch)
tree411dd12865f53ca425844916e16960d378fa3f13
parentbc9423316f373a5baa63aa47b9ab340d34c9d6ac (diff)
Fix documentation about QStringLiteral
The fallback for QStringLiteral in case C++11 features are not enabled is QString::fromUtf8(), not QLatin1String(). Also, the result of a QStringLiteral expression _is_ a QString. Change-Id: Ib9c2f4c13fff237de3acb2e0f64027bacea6271c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/tools/qstring.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index aac9c493c3..a018b81c38 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -9872,9 +9872,7 @@ QString QString::toHtmlEscaped() const
the read-only segment of the compiled object file.
For compilers not supporting the creation of compile time strings, QStringLiteral will fall back to
- QLatin1String.
-
- The result of the QStringLiteral expression can be cast into a QString.
+ QString::fromUtf8().
If you have code looking like:
\code