From d669bde4bf32b19e317b6f58077f406a7d0e12e0 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Sun, 25 Oct 2015 15:20:10 -0700 Subject: [PATCH] Make use of Objective-C conversion functions. Change-Id: I6a96b69c2d371f0f5fbfa10c7060941a9193a1d4 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoaservices.mm | 6 ++---- 1 file 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 #include @@ -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