summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiostextresponder.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/ios/qiostextresponder.mm')
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm
index 9a077323e7..3c95083e45 100644
--- a/src/plugins/platforms/ios/qiostextresponder.mm
+++ b/src/plugins/platforms/ios/qiostextresponder.mm
@@ -163,7 +163,7 @@
@implementation QIOSTextInputResponder
-- (id)initWithInputContext:(QIOSInputContext *)inputContext
+- (id)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)inputContext
{
if (!(self = [self init]))
return self;
@@ -680,11 +680,7 @@
if (markedTextFormat.isEmpty()) {
// There seems to be no way to query how the preedit text
// should be drawn. So we need to hard-code the color.
- QSysInfo::MacVersion iosVersion = QSysInfo::MacintoshVersion;
- if (iosVersion < QSysInfo::MV_IOS_7_0)
- markedTextFormat.setBackground(QColor(235, 239, 247));
- else
- markedTextFormat.setBackground(QColor(206, 221, 238));
+ markedTextFormat.setBackground(QColor(206, 221, 238));
}
QList<QInputMethodEvent::Attribute> attrs;
@@ -812,7 +808,7 @@
[self sendEventToFocusObject:e];
}
- return toCGRect(startRect.united(endRect));
+ return startRect.united(endRect).toCGRect();
}
- (NSArray *)selectionRectsForRange:(UITextRange *)range
@@ -830,7 +826,7 @@
// Assume for now that position is always the same as
// cursor index until a better API is in place:
QRectF cursorRect = qApp->inputMethod()->cursorRectangle();
- return toCGRect(cursorRect);
+ return cursorRect.toCGRect();
}
- (void)replaceRange:(UITextRange *)range withText:(NSString *)text
@@ -897,6 +893,7 @@
// text instead of just guessing...
}
+#ifndef Q_OS_TVOS
- (NSDictionary *)textStylingAtPosition:(UITextPosition *)position inDirection:(UITextStorageDirection)direction
{
Q_UNUSED(position);
@@ -916,6 +913,7 @@
return [NSDictionary dictionary];
return [NSDictionary dictionaryWithObject:uifont forKey:NSFontAttributeName];
}
+#endif
- (NSDictionary *)markedTextStyle
{