summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-09-07 11:58:54 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-09-07 11:58:54 +0200
commit50af55095afe1ba048dde357b771485ef2188778 (patch)
treec686d323fdcc1c2f9c64ca3cf6c02f072eb453ee /src/gui/text/qfontengine.cpp
parent0f9b98736ceedebece6c9cd4ce2e669300f882c7 (diff)
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.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index dec09821d3..b4c58b53a4 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1335,8 +1335,7 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
int glyph_pos = 0;
for (int i = 0; i < len; ++i) {
- bool surrogate = (str[i].unicode() >= 0xd800 && str[i].unicode() < 0xdc00 && i < len-1
- && str[i+1].unicode() >= 0xdc00 && str[i+1].unicode() < 0xe000);
+ bool surrogate = (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate());
if (glyphs->glyphs[glyph_pos] == 0 && str[i].category() != QChar::Separator_Line) {
QGlyphLayoutInstance tmp = glyphs->instance(glyph_pos);