OS X: when opening a URL via QFileOpenEvent, pass as QUrl

Opening a file from Finder and opening a URL from the browser are two
different operations, and the URL might not be a local file.

Task-number: QTBUG-39972
Change-Id: I467dfef7efe8eb88c922410db16137e135bc8133
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Shawn Rutledge 2014-07-01 14:42:50 +02:00
parent 8377384e3a
commit 90053954b8
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ static void cleanupCocoaApplicationDelegate()
{
Q_UNUSED(replyEvent);
NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
QWindowSystemInterface::handleFileOpenEvent(QCFString::toQString(urlString));
QWindowSystemInterface::handleFileOpenEvent(QUrl(QCFString::toQString(urlString)));
}
- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent