diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-10-06 05:12:46 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-10-06 05:16:09 (GMT) |
commit | cd4389efee184d2ad65b52c5ef64793868f1a004 (patch) | |
tree | 33155ac833c91072c7c2dc10376c59c0f453fcf6 /src/declarative/graphicsitems/qdeclarativetextinput.cpp | |
parent | 695b54e671b55bd8103dee8b30ee76309dbd26c1 (diff) | |
download | Qt-cd4389efee184d2ad65b52c5ef64793868f1a004.zip Qt-cd4389efee184d2ad65b52c5ef64793868f1a004.tar.gz Qt-cd4389efee184d2ad65b52c5ef64793868f1a004.tar.bz2 |
Ensure the TextInput cursor blinks immediately when enabled.
Previously we relied on cursorPosChanged being called to do the update,
but that isn't called in all circumstances. Now we explicitly update
when the cursor is enabled or disabled.
Task-number: QTBUG-13993
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 4817999..637dd77 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -417,7 +417,11 @@ void QDeclarativeTextInput::setCursorVisible(bool on) return; d->cursorVisible = on; d->control->setCursorBlinkPeriod(on?QApplication::cursorFlashTime():0); - //d->control should emit the cursor update regions + QRect r = d->control->cursorRect(); + if (d->control->inputMask().isEmpty()) + updateRect(r); + else + updateRect(); emit cursorVisibleChanged(d->cursorVisible); } |