TextInput: Fix cursor navigation with mask
authorFrederik Gladhorn <frederik.gladhorn@digia.com>
Tue, 23 Apr 2013 08:04:28 +0000 (10:04 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 23 Apr 2013 09:26:14 +0000 (11:26 +0200)
commit5f7ba49e2501286670e19ee8ba7d48b169fa3330
treef15759630065bae0370a8980abb373beb486bb3e
parente865df80a907ceb3354a3369f9467022f451d692
TextInput: Fix cursor navigation with mask

text().length() was used to check if a cursor movement
to the right was valid. The problem is that with a mask and
not text set yet (inputMask: "#0:00;*") pressing the right
arrow would not move the cursor.
The input and other functions use the actual d->m_text
since that includes the mask length.

Task-number: QTBUG-30740

Change-Id: Ic225778e5a49d80b754b63d0eb4a438eaa9818e2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/quick/items/qquicktextinput.cpp
tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp