Move cursorDelegate with the mouse selection of read only text input.

Task-number: QTBUG-20719
Task-number: QTBUG-19109
Reviewed-by: Martin Jones

Change-Id: I2cec51eb5b01dc5750614edf5b39d6a3da661fc6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
This commit is contained in:
Andrew den Exter 2011-08-04 10:58:26 +10:00 committed by Qt by Nokia
parent 734033e71d
commit 28165d5446

View File

@ -1696,8 +1696,10 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button
#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);
@ -1744,8 +1746,10 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but
repaintOldAndNewSelection(oldSelection);
if (cursor.position() != oldCursorPos)
if (cursor.position() != oldCursorPos) {
emit q->cursorPositionChanged();
emit q->microFocusChanged();
}
if (interactionFlags & Qt::LinksAccessibleByMouse) {
if (!(button & Qt::LeftButton))