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>
This commit is contained in:
Andrew den Exter 2011-08-04 10:58:26 +10:00 committed by Qt by Nokia
parent c8baa5602a
commit 8febd56940

View File

@ -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))