summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-09-08 13:38:41 +0200
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-09-10 12:21:20 +0000
commitd75505faccc9a86d9e76932ae022b660e01ad1a5 (patch)
tree9347492b6bb4214666669341f0c29d33f79bc30d /src
parent4b2db07b42dc0be28beafbd20d005cc0b7b11fc5 (diff)
iOS: silence compiler warning about unimplemented 'selectionRectsForRange'
Implement a dummy method to silence the compiler. After testing, this method seems to never be called. Which is good, since the current IM API in Qt have little to offer to resolve what is being asked. Until a need arise, we just return an empty array. Change-Id: I573eb8205a7e635a46d487ae175fb46e3a602001 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm
index 4e109f6921..c9120e848c 100644
--- a/src/plugins/platforms/ios/qiostextresponder.mm
+++ b/src/plugins/platforms/ios/qiostextresponder.mm
@@ -738,6 +738,15 @@
return toCGRect(startRect.united(endRect));
}
+- (NSArray *)selectionRectsForRange:(UITextRange *)range
+{
+ Q_UNUSED(range);
+ // This method is supposed to return a rectangle for each line with selection. Since we don't
+ // expose an API in Qt/IM for getting this information, and since we never seems to be getting
+ // a call from UIKit for this, we return an empty array until a need arise.
+ return [[NSArray new] autorelease];
+}
+
- (CGRect)caretRectForPosition:(UITextPosition *)position
{
Q_UNUSED(position);