From 8febd569408db19c8a83e16cc7a8574f9b00084b Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 4 Aug 2011 10:58:26 +1000 Subject: [PATCH] Move cursorDelegate with the mouse selection of read only text input. Task-number: QTBUG-19109 Reviewed-by: Martin Jones Change-Id: I709427fe73b2d6ed9e3526af140b9dc375740789 Reviewed-on: http://codereview.qt.nokia.com/4164 Reviewed-by: Andrew den Exter --- src/gui/text/qtextcontrol.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index c29379ed28..a03dabf52a 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1674,8 +1674,10 @@ void QTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button, cons #endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } } selectionChanged(true); repaintOldAndNewSelection(oldSelection); @@ -1719,8 +1721,10 @@ void QTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton button, c repaintOldAndNewSelection(oldSelection); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } if (interactionFlags & Qt::LinksAccessibleByMouse) { if (!(button & Qt::LeftButton))