Scroll correctly when cursorPosition is changed within onTextChanged.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 25 Jul 2011 03:17:35 +0000 (13:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 25 Jul 2011 06:15:47 +0000 (08:15 +0200)
commit3bb8c0d3f2115765b519f795a2898456bf31924b
tree0465280f1a97056c688528776dc839022c5b07c8
parent9f9b23fd7943a3d125cb1cc9f333ce430b2706ea
Scroll correctly when cursorPosition is changed within onTextChanged.

Emit textChanged() before adjusting size and scroll positions otherwise
the calculations will be based on the cursor position before it's moved
in handler and because the cursor position won't ultimately have changed
there won't be a follow up cursorPositionChanged() signal to trigger a
second set of calculation.

Task-number: QTBUG-19912
Reviewed-by: Martin Jones
(cherry picked from commit bb11b53bedb8e239b9439b4a3fc3320e35c2de57)

Conflicts:

src/declarative/graphicsitems/qdeclarativetextinput.cpp

Change-Id: I579bc3fe6c80766dfadfbc9dbd46144607bf7b03
Reviewed-on: http://codereview.qt.nokia.com/2058
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
src/declarative/items/qsgtextinput.cpp
src/qtquick1/graphicsitems/qdeclarativetextinput.cpp