summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-06-20 02:18:57 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-06-20 02:32:27 (GMT)
commitbb11b53bedb8e239b9439b4a3fc3320e35c2de57 (patch)
treeba9b8319529dd0e12df03ca7c4a57671534a1c22 /src
parentde48af046a093834b8178238a2afb2efc8636efd (diff)
downloadQt-bb11b53bedb8e239b9439b4a3fc3320e35c2de57.zip
Qt-bb11b53bedb8e239b9439b4a3fc3320e35c2de57.tar.gz
Qt-bb11b53bedb8e239b9439b4a3fc3320e35c2de57.tar.bz2
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. Change-Id: I1af7cf320baf984388d90562233c5686dcf44d20 Task-number: QTBUG-19912 Reviewed-by: Martin Jones
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 0d10bb6..21e3ad3 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1940,12 +1940,12 @@ void QDeclarativeTextInput::selectionChanged()
void QDeclarativeTextInput::q_textChanged()
{
Q_D(QDeclarativeTextInput);
+ emit textChanged();
+ emit displayTextChanged();
updateSize();
d->determineHorizontalAlignment();
d->updateHorizontalScroll();
updateMicroFocus();
- emit textChanged();
- emit displayTextChanged();
if(hasAcceptableInput() != d->oldValidity){
d->oldValidity = hasAcceptableInput();
emit acceptableInputChanged();