diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2011-09-07 09:58:54 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-09-07 09:58:54 (GMT) |
commit | 50af55095afe1ba048dde357b771485ef2188778 (patch) | |
tree | c686d323fdcc1c2f9c64ca3cf6c02f072eb453ee /src/gui/text/qfontengine_x11.cpp | |
parent | 0f9b98736ceedebece6c9cd4ce2e669300f882c7 (diff) | |
download | Qt-50af55095afe1ba048dde357b771485ef2188778.zip Qt-50af55095afe1ba048dde357b771485ef2188778.tar.gz Qt-50af55095afe1ba048dde357b771485ef2188778.tar.bz2 |
Replace explicit surrogate handlers by inline methods of QChar class
Merge-request: 1284
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/gui/text/qfontengine_x11.cpp')
-rw-r--r-- | src/gui/text/qfontengine_x11.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp index 490866c..6e87f4c 100644 --- a/src/gui/text/qfontengine_x11.cpp +++ b/src/gui/text/qfontengine_x11.cpp @@ -358,9 +358,7 @@ bool QFontEngineXLFD::stringToCMap(const QChar *s, int len, QGlyphLayout *glyphs QVarLengthArray<ushort> _s(len); QChar *str = (QChar *)_s.data(); for (int i = 0; i < len; ++i) { - if (i < len - 1 - && s[i].unicode() >= 0xd800 && s[i].unicode() < 0xdc00 - && s[i+1].unicode() >= 0xdc00 && s[i].unicode() < 0xe000) { + if (s[i].isHighSurrogate() && i < len-1 && s[i+1].isLowSurrogate()) { *str = QChar(); ++i; } else { |