diff options
author | aavit <qt-info@nokia.com> | 2011-09-17 19:44:51 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-09-17 20:27:51 (GMT) |
commit | f7a6de98e4e234833966fbe81b8ab54eba9f8429 (patch) | |
tree | 012247296bab712fcd19b92cf1a5990fd0ed2af1 /src/gui/widgets/qlinecontrol.cpp | |
parent | 8b2ee10cb1113c27d37b52dba6f7aa28d2de55b9 (diff) | |
parent | cee22b68ed811f5b26a891d6a644613ad79aa981 (diff) | |
download | Qt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.zip Qt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.tar.gz Qt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.tar.bz2 |
Merge remote branch 'qt-mainline/4.8'
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index a8031e7..d58da37 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -198,12 +198,10 @@ void QLineControl::backspace() --m_cursor; if (m_maskData) m_cursor = prevMaskBlank(m_cursor); - QChar uc = m_text.at(m_cursor); - if (m_cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { + if (m_cursor > 0 && m_text.at(m_cursor).isLowSurrogate()) { // second half of a surrogate, check if we have the first half as well, // if yes delete both at once - uc = m_text.at(m_cursor - 1); - if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) { + if (m_text.at(m_cursor - 1).isHighSurrogate()) { internalDelete(true); --m_cursor; } |