Make QJsonPrivate::String compile on big endian platforms.
Was missing a variable declaration and an explicit cast. Change-Id: I4f0fb9c3d9b8472adf0d91036442adc1fe255c7e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
bcb0f28a4d
commit
76afa1556c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user