summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-04-27 01:16:04 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-04-27 01:34:05 (GMT)
commit10830210607d08eeb2af5d091639506a7d8cc634 (patch)
tree0b5c3d8bb44c5d13bf08e634a3b2e3f315dea96c /src/declarative
parentf14ac31c86eeb53d0b08c799ad0ad895d17475d6 (diff)
downloadQt-10830210607d08eeb2af5d091639506a7d8cc634.zip
Qt-10830210607d08eeb2af5d091639506a7d8cc634.tar.gz
Qt-10830210607d08eeb2af5d091639506a7d8cc634.tar.bz2
Move the TextInput cursor delegate when the preedit position changes.
Change-Id: Ia7150122444e465ffbcc02e921d42d01c2dfdac1 Task-number: QTBUG-18892 Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index ee241d6..6eb6b68 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -949,6 +949,8 @@ void QDeclarativeTextInput::setCursorDelegate(QDeclarativeComponent* c)
//note that the components are owned by something else
disconnect(d->control, SIGNAL(cursorPositionChanged(int,int)),
this, SLOT(moveCursor()));
+ disconnect(d->control, SIGNAL(updateMicroFocus()),
+ this, SLOT(moveCursor()));
delete d->cursorItem;
}else{
d->startCreatingCursor();
@@ -961,7 +963,9 @@ void QDeclarativeTextInputPrivate::startCreatingCursor()
{
Q_Q(QDeclarativeTextInput);
q->connect(control, SIGNAL(cursorPositionChanged(int,int)),
- q, SLOT(moveCursor()));
+ q, SLOT(moveCursor()), Qt::UniqueConnection);
+ q->connect(control, SIGNAL(updateMicroFocus()),
+ q, SLOT(moveCursor()), Qt::UniqueConnection);
if(cursorComponent->isReady()){
q->createCursor();
}else if(cursorComponent->isLoading()){