diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-12-14 05:27:23 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-12-14 05:37:50 (GMT) |
commit | f58cf707dd5668ca2849f457e951a9cef7d1d544 (patch) | |
tree | 118ea95d7650043813850004c318989a74a1a7f5 /src/declarative | |
parent | 040268af2d53532e7f6501c24cdfcb424d60be89 (diff) | |
download | Qt-f58cf707dd5668ca2849f457e951a9cef7d1d544.zip Qt-f58cf707dd5668ca2849f457e951a9cef7d1d544.tar.gz Qt-f58cf707dd5668ca2849f457e951a9cef7d1d544.tar.bz2 |
Revert a fix made for bug QTBUG-15341
Reverted a commit 2eee49127b80b5b56c605f76ccea004b03d89577 "Remove active selection when TextEdit loses focus". Contrary to TextInput, by default TextEdit keeps the selection visible when the editor loses active focus. If this is not wanted, a property called persistentSelection can be set false to make selection dependant on the focus.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 14 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit_p.h | 1 |
2 files changed, 0 insertions, 15 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 1042cf1..e05f4e4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -994,20 +994,6 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus) QDeclarativeItemPrivate::focusChanged(hasFocus); } -void QDeclarativeTextEdit::focusOutEvent(QFocusEvent *event) -{ - Q_D(QDeclarativeTextEdit); - if (event->reason() != Qt::ActiveWindowFocusReason - && event->reason() != Qt::PopupFocusReason) { - QTextCursor cursor = d->control->textCursor(); - if (cursor.hasSelection()) { - cursor.clearSelection(); - d->control->setTextCursor(cursor); - } - } - QDeclarativePaintedItem::focusOutEvent(event); -} - /*! \qmlmethod void TextEdit::selectAll() diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 6826cb5..68fde3d 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -249,7 +249,6 @@ protected: void keyPressEvent(QKeyEvent *); void keyReleaseEvent(QKeyEvent *); void focusInEvent(QFocusEvent *event); - void focusOutEvent(QFocusEvent *event); // mouse filter? void mousePressEvent(QGraphicsSceneMouseEvent *event); |