diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-05-28 14:14:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-06 11:21:17 +0200 |
commit | bc9423316f373a5baa63aa47b9ab340d34c9d6ac (patch) | |
tree | c65a68b0d425cab938a1bb0635ebbdb62e430c8b /src/plugins/platforms/ios/quiview.h | |
parent | dbc7ed82149d8915a32489a0d3a930d2793c6e65 (diff) |
iOS: delay callbacks to UITextInput to avoid recursion
If the application calls "reset" or "commit" on the input
method (or forces active focus on some other item) from a text
changed or key pressed handler, iOS will sometimes throw
an exception. It does so because we try to change the state
of UITextInput (by calling textDidChange) while processing a
callback from the same place (insertText).
Optimally this should not happen since we would normally
post such events to Qt, not send them directly. But with
text input we cannot do this since UITextInput expects us
to update immediately upon receiving text input callbacks.
If not, word completion and spell checking will stop working.
This change will guard against recursive callbacks by delaying
callbacks to UITextInput when text/selection/first responder
changes.
Change-Id: I099f30adf1c5aba241fc833a45b423016f4ed8d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/quiview.h')
-rw-r--r-- | src/plugins/platforms/ios/quiview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h index 575dedab89..122e7c604b 100644 --- a/src/plugins/platforms/ios/quiview.h +++ b/src/plugins/platforms/ios/quiview.h @@ -75,4 +75,5 @@ - (void)updateInputMethodWithQuery:(Qt::InputMethodQueries)query; - (void)reset; - (void)commit; ++ (bool)inUpdateKeyboardLayout; @end |