summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-01-28 15:55:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 14:19:49 +0100
commit60fe9fb018fda423754941e41be17186fd98fa85 (patch)
tree42105f1d26ac8d6507c676afe593564437b7f351 /src/plugins
parent7eb8b67c8bc8e69b3dd6fb39dde09ac36f56e538 (diff)
iOS: add spell checking support
We don't have a separate enum just for spell checking in Qt, but Qt::ImhNoPredicitiveText should cover it. So use it to enable/disable both spell checking and auto completion. Change-Id: I7ad661cb7d720988f13bc1ed940573006c0ce229 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/quiview.h1
-rw-r--r--src/plugins/platforms/ios/quiview_textinput.mm2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h
index 8984561dd8..575dedab89 100644
--- a/src/plugins/platforms/ios/quiview.h
+++ b/src/plugins/platforms/ios/quiview.h
@@ -62,6 +62,7 @@
@property(nonatomic, assign) id<UITextInputDelegate> inputDelegate;
@property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
@property(nonatomic) UITextAutocorrectionType autocorrectionType;
+@property(nonatomic) UITextSpellCheckingType spellCheckingType;
@property(nonatomic) BOOL enablesReturnKeyAutomatically;
@property(nonatomic) UIKeyboardAppearance keyboardAppearance;
@property(nonatomic) UIKeyboardType keyboardType;
diff --git a/src/plugins/platforms/ios/quiview_textinput.mm b/src/plugins/platforms/ios/quiview_textinput.mm
index 06d6fb4078..21ef93c4ed 100644
--- a/src/plugins/platforms/ios/quiview_textinput.mm
+++ b/src/plugins/platforms/ios/quiview_textinput.mm
@@ -496,6 +496,8 @@ Q_GLOBAL_STATIC(StaticVariables, staticVariables);
self.secureTextEntry = BOOL(hints & Qt::ImhHiddenText);
self.autocorrectionType = (hints & Qt::ImhNoPredictiveText) ?
UITextAutocorrectionTypeNo : UITextAutocorrectionTypeDefault;
+ self.spellCheckingType = (hints & Qt::ImhNoPredictiveText) ?
+ UITextSpellCheckingTypeNo : UITextSpellCheckingTypeDefault;
if (hints & Qt::ImhUppercaseOnly)
self.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters;