diff options
Diffstat (limited to 'src/widgets/platforms/win')
-rw-r--r-- | src/widgets/platforms/win/qcursor_win.cpp | 1 | ||||
-rw-r--r-- | src/widgets/platforms/win/qfontengine_win.cpp | 13 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/widgets/platforms/win/qcursor_win.cpp b/src/widgets/platforms/win/qcursor_win.cpp index 9f0c516f8b..cef83f5a1b 100644 --- a/src/widgets/platforms/win/qcursor_win.cpp +++ b/src/widgets/platforms/win/qcursor_win.cpp @@ -477,6 +477,7 @@ void QCursorData::update() QPixmap pixmap = QApplicationPrivate::instance()->getPixmapCursor(cshape); hcurs = create32BitCursor(pixmap, hx, hy); } + break; default: qWarning("QCursor::update: Invalid cursor shape %d", cshape); return; diff --git a/src/widgets/platforms/win/qfontengine_win.cpp b/src/widgets/platforms/win/qfontengine_win.cpp index aef2145e5e..fc11387367 100644 --- a/src/widgets/platforms/win/qfontengine_win.cpp +++ b/src/widgets/platforms/win/qfontengine_win.cpp @@ -224,15 +224,12 @@ void QFontEngineWin::getCMap() inline unsigned int getChar(const QChar *str, int &i, const int len) { - unsigned int uc = str[i].unicode(); - if (uc >= 0xd800 && uc < 0xdc00 && i < len-1) { - uint low = str[i+1].unicode(); - if (low >= 0xdc00 && low < 0xe000) { - uc = (uc - 0xd800)*0x400 + (low - 0xdc00) + 0x10000; - ++i; - } + uint ucs4 = str[i].unicode(); + if (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate()) { + ++i; + ucs4 = QChar::surrogateToUcs4(ucs4, str[i].unicode()); } - return uc; + return ucs4; } int QFontEngineWin::getGlyphIndexes(const QChar *str, int numChars, QGlyphLayout *glyphs, bool mirrored) const |