summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaservices.mm
blob: 68daa660efb66a63ec79b888ddad3b472150dcd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qcocoaservices.h"

#include <AppKit/NSWorkspace.h>
#include <Foundation/NSURL.h>

#include <QtCore/QUrl>

QT_BEGIN_NAMESPACE

bool QCocoaServices::openUrl(const QUrl &url)
{
    return [[NSWorkspace sharedWorkspace] openURL:url.toNSURL()];
}

bool QCocoaServices::openDocument(const QUrl &url)
{
    return openUrl(url);
}

QT_END_NAMESPACE