summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-08-02 15:58:48 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-02 17:14:02 +0200
commit6f4212e5936b96a8be0eacddbfc4dd7ca5abd776 (patch)
tree928c856678a43b16a7cbc1f102f574156e7f8ffb /src/corelib/tools/qbytearray.h
parentb29fae1736ed306f10629bbd8b3363a23afbfb0f (diff)
Fix QString/QByteArray literals for MSVC2010 (compilation of tests).
- Specify return type of QByteArrayLiteral/QStringLiteral lambdas. - Define QT_UNICODE_LITERAL instead of QT_UNICODE_MARKER. Change-Id: I8a53506887d2736b093798220b088f645f05e415 Reviewed-on: http://codereview.qt.nokia.com/2514 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r--src/corelib/tools/qbytearray.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 5cf4c15179..b70dba4d55 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -146,7 +146,7 @@ template<int N> struct QConstByteArrayDataPtr
#if defined(Q_COMPILER_LAMBDA)
-# define QByteArrayLiteral(str) ([]() { \
+# define QByteArrayLiteral(str) ([]() -> QConstByteArrayDataPtr<sizeof(str) - 1> { \
enum { Size = sizeof(str) - 1 }; \
static const QConstByteArrayData<Size> qbytearray_literal = \
{ { Q_REFCOUNT_INITIALIZER(-1), Size, 0, 0, { 0 } }, str }; \