From 76afa1556c9739f341adf15226b84bcc8cbaa032 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Mon, 27 Feb 2012 22:19:39 +0100 Subject: Make QJsonPrivate::String compile on big endian platforms. Was missing a variable declaration and an explicit cast. Change-Id: I4f0fb9c3d9b8472adf0d91036442adc1fe255c7e Reviewed-by: Lars Knoll --- src/corelib/json/qjson_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/json/qjson_p.h') diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h index 55c37988e2..0742ced39b 100644 --- a/src/corelib/json/qjson_p.h +++ b/src/corelib/json/qjson_p.h @@ -309,6 +309,7 @@ public: { d->length = str.length(); #if Q_BYTE_ORDER == Q_BIG_ENDIAN + const qle_ushort *uc = (const qle_ushort *)str.unicode(); for (int i = 0; i < str.length(); ++i) d->utf16[i] = uc[i]; #else @@ -359,7 +360,7 @@ public: QString str(l, Qt::Uninitialized); QChar *ch = str.data(); for (int i = 0; i < l; ++i) - ch[i] = d->utf16[i]; + ch[i] = QChar(d->utf16[i]); return str; #endif } -- cgit v1.2.3