diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-10-24 08:34:46 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-11-07 10:33:27 +0100 |
commit | 3916b8a28bc9c55e10f4de611ed76e17017494aa (patch) | |
tree | 65898c15789440c2adb1c338ddc1589098e15199 /src | |
parent | 78ed3a12dbae70232711fd704e549ea0595ddd95 (diff) |
iOS: Account for UITextInteraction when building against 12.x or lower
In iOS 13.0 we can handle UITextInteraction as normal, but in lower
versions it is not available to utilize at compile time. So we have to
check for the other types instead and return if it is not one of those.
Change-Id: Icbc5558e677ed40c03f30a174e2d79b87f489f68
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/ios/quiview.mm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 4e3657ec37..91a186bace 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -628,17 +628,13 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") #endif } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) - (void)addInteraction:(id<UIInteraction>)interaction { - if (__builtin_available(iOS 13.0, *)) { - if ([interaction isKindOfClass:UITextInteraction.class]) - return; // Prevent iOS from adding UITextInteraction - } + if ([NSStringFromClass(interaction.class) isEqualToString:@"UITextInteraction"]) + return; [super addInteraction:interaction]; } -#endif @end |