From 8e7fa2b5aa2e2e4371c4b73926d0e6ad2ebdbd96 Mon Sep 17 00:00:00 2001 From: Steffen Imhof Date: Fri, 23 May 2014 15:37:45 +0200 Subject: Compile fix: do not use composeMode() if QT_NO_IM is defined. Change-Id: Ib0046657ba687e6427c67c7dce0d71ec3be87f48 Reviewed-by: Mitch Curtis Reviewed-by: Gunnar Sletta --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 787424e4..cd143492 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1174,13 +1174,16 @@ void QDeclarativeTextInput::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (qAbs(int(event->pos().x() - d->pressPos.x())) > QApplication::startDragDistance()) setKeepMouseGrab(true); +#ifndef QT_NO_IM if (d->control->composeMode()) { // start selection int startPos = d->xToPos(d->pressPos.x()); int currentPos = d->xToPos(event->pos().x()); if (startPos != currentPos) d->control->setSelection(startPos, currentPos - startPos); - } else { + } else +#endif + { moveCursorSelection(d->xToPos(event->pos().x()), d->mouseSelectionMode); } event->setAccepted(true); -- cgit v1.2.3