diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-02-20 11:58:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-28 01:06:43 +0100 |
commit | f3f60743551936e3d06f7f5c8bb2c76eab6d536c (patch) | |
tree | 5d17c353bfa4ee3ca2b0b255c96983927a63e0ac | |
parent | 01292ac849363eea97bcb981ccded1279dc95e6c (diff) |
Document MSVC-restrictions regarding QStringLiteral.
Task-number: QTBUG-28885
Change-Id: I02eed2b27970ec31479a6c80fbe4c336431e13de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r-- | src/corelib/tools/qstring.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index c9525cf0ae..404e3be289 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -9239,6 +9239,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 |