summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-08 16:27:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-08 16:27:12 (GMT)
commit3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400 (patch)
tree05c11c5636d44b7e8afaa5982cc48fe2eb45726d /src/gui/widgets
parent260005374b9b930aa583cd117aba96f8f4b34131 (diff)
parent2a1e82452a192c88bcf0250f5976492f6dc3b65f (diff)
downloadQt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.zip
Qt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.tar.gz
Qt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Split CFLAGS from pkg-config properly Ensure that the proxystyle is used over the style's own functions runonphone: Add a missing space between a message and the file name Perl check for windows configure. QSettings: don't assume XDG_CONFIG_HOME is latin1-encoded QSettings: use the common appdata dir when bootstrapping qmake on win Replace explicit surrogate handlers by inline methods of QChar class
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
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;
}