summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-08-04 10:58:26 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-05 04:07:17 +0200
commit8febd569408db19c8a83e16cc7a8574f9b00084b (patch)
treeb59e7a73911b9eaa8a2847d3b99b16e0360bc3c8 /src/gui/text/qtextcontrol.cpp
parentc8baa5602a478fb4e2907b8a319397c15a72ad1c (diff)
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 <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r--src/gui/text/qtextcontrol.cpp8
1 files 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))