diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-10-25 15:20:10 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-10-26 09:44:52 +0000 |
commit | d669bde4bf32b19e317b6f58077f406a7d0e12e0 (patch) | |
tree | 3a77b2a5f5d0f67eed9b8688918939a354eeb0ae /src/plugins/platforms/cocoa/qcocoaservices.mm | |
parent | 66084f1c3dd0884ee8282fa9c30ef3cfd5c1f24e (diff) |
Make use of Objective-C conversion functions.
Change-Id: I6a96b69c2d371f0f5fbfa10c7060941a9193a1d4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaservices.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaservices.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaservices.mm b/src/plugins/platforms/cocoa/qcocoaservices.mm index 6f3f6c4e1d..75fc32f338 100644 --- a/src/plugins/platforms/cocoa/qcocoaservices.mm +++ b/src/plugins/platforms/cocoa/qcocoaservices.mm @@ -33,8 +33,6 @@ #include "qcocoaservices.h" -#include "qt_mac_p.h" - #include <AppKit/NSWorkspace.h> #include <Foundation/NSURL.h> @@ -47,7 +45,7 @@ bool QCocoaServices::openUrl(const QUrl &url) const QString scheme = url.scheme(); if (scheme.isEmpty()) return openDocument(url); - return [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:QCFString::toNSString(url.toString(QUrl::FullyEncoded))]]; + return [[NSWorkspace sharedWorkspace] openURL:url.toNSURL()]; } bool QCocoaServices::openDocument(const QUrl &url) @@ -55,7 +53,7 @@ bool QCocoaServices::openDocument(const QUrl &url) if (!url.isValid()) return false; - return [[NSWorkspace sharedWorkspace] openFile:QCFString::toNSString(url.toLocalFile())]; + return [[NSWorkspace sharedWorkspace] openFile:url.toLocalFile().toNSString()]; } QT_END_NAMESPACE |