summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.cpp')
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 247d0afb0b..b17651e1d3 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -259,19 +259,15 @@ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e )
if ( control->composeMode() ) {
int tmp_cursor = xToPos(e->pos().x());
int mousePos = tmp_cursor - control->cursor();
- if ( mousePos < 0 || mousePos > control->preeditAreaText().length() ) {
+ if ( mousePos < 0 || mousePos > control->preeditAreaText().length() )
mousePos = -1;
- // don't send move events outside the preedit area
- if ( e->type() == QEvent::MouseMove )
- return true;
- }
QInputContext *qic = q->inputContext();
- if ( qic )
+ if (qic && mousePos >= 0) {
// may be causing reset() in some input methods
qic->mouseHandler(mousePos, e);
- if (!control->preeditAreaText().isEmpty())
return true;
+ }
}
#else
Q_UNUSED(e);