summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjson_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/json/qjson_p.h')
-rw-r--r--src/corelib/json/qjson_p.h3
1 files changed, 2 insertions, 1 deletions
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
}