path: root/src/plugins/platforms/ios/qiostextresponder.h
diff options
authorRichard Moe Gustavsen <>2015-01-13 12:53:04 +0100
committerRichard Moe Gustavsen <>2015-01-15 08:24:26 +0100
commit13ecde3b7af364be2db466029f796f3cb6310685 (patch)
treed4a574ee80def1320f18bf66e9f94d60980ccbdf /src/plugins/platforms/ios/qiostextresponder.h
parent34ce66cd89ea1c618d8f63dd2d9b95aed0a81b11 (diff)
iOS: guard text responder from clearing selection
When programatically setting a text selection on iOS, we call [UITextInputDelegate selectionWillChange] to report the change. If auto correction is enabled, UIKit will then reset the current tracking, and for some reason tell us to clear the selection. This is contradictory to us saying the the selection is about to change, and will cause an unwanted recursion back to Qt. Since there seems to be no way to stop UIKit from doing this, this patch will instead add a guard that refuses to change the selection recursively while processing a selection change from Qt. Task-number: QTBUG-43716 Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a Reviewed-by: Tor Arne Vestbø <>
Diffstat (limited to 'src/plugins/platforms/ios/qiostextresponder.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.h b/src/plugins/platforms/ios/qiostextresponder.h
index 118ab8958a..21b61bf8da 100644
--- a/src/plugins/platforms/ios/qiostextresponder.h
+++ b/src/plugins/platforms/ios/qiostextresponder.h
@@ -51,6 +51,7 @@ class QIOSInputContext;
QIOSInputContext *m_inputContext;
QString m_markedText;
BOOL m_inSendEventToFocusObject;
+ BOOL m_inSelectionChange;
- (id)initWithInputContext:(QIOSInputContext *)context;