Don't overwrite text selections made in focus handlers.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 12 Mar 2012 05:49:26 +0000 (15:49 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 21 Mar 2012 05:52:37 +0000 (06:52 +0100)
commitb6380adcf0cb68bbcceaf77faf84eadaad591165
tree4ce447203268a19ff67e9bfc0a3ce5c6ebaa30d4
parent0e1baa28e59ccd1739ee1957035c10518aed8ece
Don't overwrite text selections made in focus handlers.

Defer giving focus to TextInput or TextEdit until after other mouse
press handling has been performed, otherwise setting the cursor position
will overwrite any selection or cursor position set in the
on(Active)FocusChanged handler.

Change-Id: I6332642484de65138a444987b5a81be69c6f835f
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
src/quick/items/qquicktextedit.cpp
src/quick/items/qquicktextinput.cpp
tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp