diff options
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 815afe85f2..3db7781acc 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1520,13 +1520,16 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) #else const bool select = (d->imHints & Qt::ImhNoPredictiveText); #endif +#ifndef QT_NO_IM if (d->control->composeMode() && select) { int startPos = d->xToPos(d->mousePressPos.x()); int currentPos = d->xToPos(e->pos().x()); if (startPos != currentPos) d->control->setSelection(startPos, currentPos - startPos); - } else { + } else +#endif + { d->control->moveCursor(d->xToPos(e->pos().x()), select); } } @@ -1577,6 +1580,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) int position = d->xToPos(e->pos().x()); // exit composition mode +#ifndef QT_NO_IM if (d->control->composeMode()) { int preeditPos = d->control->cursor(); int posInPreedit = position - d->control->cursor(); @@ -1601,6 +1605,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) position += (sizeChange - preeditLength); } } +#endif if (position >= 0) d->control->selectWordAtPos(position); |