Make use of Objective-C conversion functions.
Change-Id: I6a96b69c2d371f0f5fbfa10c7060941a9193a1d4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
This commit is contained in:
parent
66084f1c3d
commit
d669bde4bf
@ -33,8 +33,6 @@
|
|||||||
|
|
||||||
#include "qcocoaservices.h"
|
#include "qcocoaservices.h"
|
||||||
|
|
||||||
#include "qt_mac_p.h"
|
|
||||||
|
|
||||||
#include <AppKit/NSWorkspace.h>
|
#include <AppKit/NSWorkspace.h>
|
||||||
#include <Foundation/NSURL.h>
|
#include <Foundation/NSURL.h>
|
||||||
|
|
||||||
@ -47,7 +45,7 @@ bool QCocoaServices::openUrl(const QUrl &url)
|
|||||||
const QString scheme = url.scheme();
|
const QString scheme = url.scheme();
|
||||||
if (scheme.isEmpty())
|
if (scheme.isEmpty())
|
||||||
return openDocument(url);
|
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)
|
bool QCocoaServices::openDocument(const QUrl &url)
|
||||||
@ -55,7 +53,7 @@ bool QCocoaServices::openDocument(const QUrl &url)
|
|||||||
if (!url.isValid())
|
if (!url.isValid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return [[NSWorkspace sharedWorkspace] openFile:QCFString::toNSString(url.toLocalFile())];
|
return [[NSWorkspace sharedWorkspace] openFile:url.toLocalFile().toNSString()];
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
Reference in New Issue
Block a user