summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-05-06 11:08:54 +0200
committerMarc Mutz <marc.mutz@kdab.com>2020-05-12 07:43:59 +0200
commite9005608eaf40a875b03e2c0513ee2b1e3675fd8 (patch)
tree82242fad71fee0f6dbe421ae720e835f578fd1ed /src/corelib/serialization
parent1a8916cc4f55b70009a50e6fc69a49f32fc02720 (diff)
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r--src/corelib/serialization/qjsonparser.cpp7
1 files changed, 1 insertions, 6 deletions
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;