From e9005608eaf40a875b03e2c0513ee2b1e3675fd8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 6 May 2020 11:08:54 +0200 Subject: QtCore: use new QChar::fromUcs{2,4}() Also replace one case of QChar(0) with QChar::Null. These were errors in my local tree, which means they're included in bootstrap builds (incl. qmake). Change-Id: I3dffa9383fd1a30aa43fe2491ad95bb2b1869b40 Reviewed-by: Lars Knoll --- src/corelib/serialization/qjsonparser.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/corelib/serialization') diff --git a/src/corelib/serialization/qjsonparser.cpp b/src/corelib/serialization/qjsonparser.cpp index d7ce702ff7..46d82ea47f 100644 --- a/src/corelib/serialization/qjsonparser.cpp +++ b/src/corelib/serialization/qjsonparser.cpp @@ -922,12 +922,7 @@ bool Parser::parseString() return false; } } - if (QChar::requiresSurrogates(ch)) { - ucs4.append(QChar::highSurrogate(ch)); - ucs4.append(QChar::lowSurrogate(ch)); - } else { - ucs4.append(QChar(ushort(ch))); - } + ucs4.append(QChar::fromUcs4(ch)); } ++json; -- cgit v1.2.3