diff options
author | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2017-09-14 12:47:11 +0200 |
---|---|---|
committer | Lars Schmertmann <lars.schmertmann@governikus.de> | 2017-10-06 06:15:30 +0000 |
commit | 6486a4bd196ca2bf0047ae80e78eee06e5e18e18 (patch) | |
tree | b55822d1637d5a281d084795a41048dabc4b58a3 /src/plugins/platforms/ios | |
parent | cb08b40976150b679d2978f82e3b7ba7c1732780 (diff) |
Avoid using deprecated APIs on iOS 10.0+
Change-Id: Ic9dc6a24ef793a29c2652ad37bc11120e2e6ceef
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiosservices.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosservices.mm b/src/plugins/platforms/ios/qiosservices.mm index 0ecc8e123f..3c44e1d7d6 100644 --- a/src/plugins/platforms/ios/qiosservices.mm +++ b/src/plugins/platforms/ios/qiosservices.mm @@ -55,11 +55,13 @@ bool QIOSServices::openUrl(const QUrl &url) return openDocument(url); NSURL *nsUrl = url.toNSURL(); + UIApplication *application = [UIApplication sharedApplication]; - if (![[UIApplication sharedApplication] canOpenURL:nsUrl]) + if (![application canOpenURL:nsUrl]) return false; - return [[UIApplication sharedApplication] openURL:nsUrl]; + [application openURL:nsUrl options:@{} completionHandler:nil]; + return true; } bool QIOSServices::openDocument(const QUrl &url) |