TextInput: Update text deselection on focus out event
authorCaroline Chao <caroline.chao@digia.com>
Tue, 5 Mar 2013 10:11:02 +0000 (11:11 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 7 Mar 2013 10:58:50 +0000 (11:58 +0100)
commit04592dae5067b87b39e1ae9387e522fb394159d6
tree650add2fca1e0876050696108f5fcb27b3841ae1
parentffd48e1ff75f03fb4d684eeb5a47a526cc1b0d47
TextInput: Update text deselection on focus out event

The text selection should not be cleared when the focus
out event received has one the following reasons:
- Qt::ActiveWindowFocusReason
- Qt::PopupFocusReason

When the user opens a menu or navigates to another window,
the eventual selection should not be clearer.

This also makes the behavior consistent with TextEdit.

Change-Id: Ibc6242cb2f8207cf5281925c8e20b88394f21eea
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/quick/items/qquicktextinput.cpp