summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextinput.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-06-29 03:32:38 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-06-29 03:32:38 (GMT)
commitc0502481e49ea2c72a767a80fafdb51f8a135c98 (patch)
tree3961188a702360a56a1223b8323f2a60e41b15b2 /src/declarative/graphicsitems/qdeclarativetextinput.cpp
parent189d2660968368532761586ffd495eb6c18cdbdf (diff)
downloadQt-c0502481e49ea2c72a767a80fafdb51f8a135c98.zip
Qt-c0502481e49ea2c72a767a80fafdb51f8a135c98.tar.gz
Qt-c0502481e49ea2c72a767a80fafdb51f8a135c98.tar.bz2
Ensure micro focus is updated in TextEdit and TextInput
Task-number: QTBUG-11552
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index ec14c78..7a16dbf 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1398,15 +1398,11 @@ void QDeclarativeTextInputPrivate::init()
q->connect(control, SIGNAL(selectionChanged()),
q, SLOT(selectionChanged()));
q->connect(control, SIGNAL(textChanged(const QString &)),
- q, SIGNAL(displayTextChanged(const QString &)));
- q->connect(control, SIGNAL(textChanged(const QString &)),
q, SLOT(q_textChanged()));
q->connect(control, SIGNAL(accepted()),
q, SIGNAL(accepted()));
q->connect(control, SIGNAL(updateNeeded(QRect)),
q, SLOT(updateRect(QRect)));
- q->connect(control, SIGNAL(cursorPositionChanged(int,int)),
- q, SLOT(updateRect()));//TODO: Only update rect between pos's
q->connect(control, SIGNAL(selectionChanged()),
q, SLOT(updateRect()));//TODO: Only update rect in selection
//Note that above TODOs probably aren't that big a savings
@@ -1422,6 +1418,8 @@ void QDeclarativeTextInputPrivate::init()
void QDeclarativeTextInput::cursorPosChanged()
{
Q_D(QDeclarativeTextInput);
+ updateRect();//TODO: Only update rect between pos's
+ updateMicroFocus();
emit cursorPositionChanged();
if(!d->control->hasSelectedText()){
@@ -1460,7 +1458,9 @@ void QDeclarativeTextInput::q_textChanged()
Q_D(QDeclarativeTextInput);
d->updateHorizontalScroll();
updateSize();
+ updateMicroFocus();
emit textChanged();
+ emit displayTextChanged();
if(hasAcceptableInput() != d->oldValidity){
d->oldValidity = hasAcceptableInput();
emit acceptableInputChanged();