From f3f60743551936e3d06f7f5c8bb2c76eab6d536c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 20 Feb 2013 11:58:35 +0100 Subject: Document MSVC-restrictions regarding QStringLiteral. Task-number: QTBUG-28885 Change-Id: I02eed2b27970ec31479a6c80fbe4c336431e13de Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart --- src/corelib/tools/qstring.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/corelib') 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 -- cgit v1.2.3