summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-17 23:11:22 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-17 23:11:22 (GMT)
commit2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (patch)
tree3e6b31daecfe217b355fa973f2f122da8468c0ac /src/gui/widgets/qlinecontrol.cpp
parentcb2980a09aefcc207eacb500d5a3c74f064859dd (diff)
parent3773fcb78db02a2577c89f755c07c2c7dbf0de74 (diff)
downloadQt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.zip
Qt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.tar.gz
Qt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.tar.bz2
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (55 commits) Fix thread safety regression of QNetworkConfigurationManager Fix instability in QNetworkConfigurationManager autotest Support word selection list with predictive text from splitview Fix softkey icon positioning in S60 5.3 QDeclarativeMouseArea: block context menu events ListViews loses items if all visible items are removed. Make TextEdit word selection more natural. Clear confusion between QMainWindow and QMainWindowLayout. Fix for rounded corners bug in QMenu Compile QWidgetPrivate::setParent_sys might be using null pointer Ensure the TextEdit cursor delegate is repositioned on mouse events. Don't crash on an invalid replacementStart from an input method. Fix incorrect hardware address on systems without getifaddrs() Enable multisampling on Symbian if hw supports it Fix QtCoreu.def file error Introduce platform extension to QGraphicsSystem Fix Symbian/WinsCW build break Prevent crash in OpenGL engine when scaling images / pixmaps. emit QNetWorkAccessManager::finished on QNetworkReply::abort() ...
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 2a15555..c9dae77 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -435,6 +435,8 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
c += event->commitString().length() - qMin(-event->replacementStart(), event->replacementLength());
m_cursor += event->replacementStart();
+ if (m_cursor < 0)
+ m_cursor = 0;
// insert commit string
if (event->replacementLength()) {
@@ -447,7 +449,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
cursorPositionChanged = true;
}
- m_cursor = qMin(c, m_text.length());
+ m_cursor = qBound(0, c, m_text.length());
for (int i = 0; i < event->attributes().size(); ++i) {
const QInputMethodEvent::Attribute &a = event->attributes().at(i);