Fix broken indendation with hard tabs

Change-Id: I1aa161ddab55f11683b2eee3c205505a829013c4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
bb10
Pekka Vuorela 2011-11-01 17:17:04 +02:00 committed by Qt by Nokia
parent 8bd40fef07
commit 10dc2171cf
1 changed files with 4 additions and 4 deletions

View File

@ -257,11 +257,11 @@ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e )
#if !defined QT_NO_IM
Q_Q(QLineEdit);
if ( control->composeMode() ) {
int tmp_cursor = xToPos(e->pos().x());
int mousePos = tmp_cursor - control->cursor();
if ( mousePos < 0 || mousePos > control->preeditAreaText().length() ) {
int tmp_cursor = xToPos(e->pos().x());
int mousePos = tmp_cursor - control->cursor();
if ( mousePos < 0 || mousePos > control->preeditAreaText().length() ) {
mousePos = -1;
// don't send move events outside the preedit area
// don't send move events outside the preedit area
if ( e->type() == QEvent::MouseMove )
return true;
}