Added triple click on TextInput to select text.
authorRafael Brandao <rafael.lobo@openbossa.org>
Thu, 29 Sep 2011 00:53:15 +0000 (10:53 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Sep 2011 01:00:38 +0000 (03:00 +0200)
commit40f63187a44fac0de25933484b84c659e0451f59
tree05d8601611f3884d4ac597d09639f1365e99a5f6
parent55b4b637779e1a6d88b969837aa106487e4c636e
Added triple click on TextInput to select text.

Once it gets a double click, it'll start to monitor any other extra
click for a short duration. Once it is detected, the monitor stops
watching and all text is selected. It only works when selectByMouse
property is set, just like double click selecting current word.

Also added a test case that simulates clicking at the same point
and triggering the triple click, and another one that contemplates
movement of mouse between the second and the third click. Also test
timing between clicks.

Task-number: QTBUG-21038

Change-Id: I139f7ece2107f5dbfcba1836afb27aaa9b24fc57
Merge-request: 6
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-on: http://codereview.qt-project.org/5761
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
src/declarative/items/qsgtextinput.cpp
src/declarative/items/qsgtextinput_p_p.h
tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp