[34401] | 1 | /* $Id: UIDesktopServices_darwin.cpp 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
[52727] | 3 | * VBox Qt GUI - Qt GUI - Utility Classes and Functions specific to darwin..
|
---|
[34401] | 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
[34401] | 8 | *
|
---|
[96407] | 9 | * This file is part of VirtualBox base platform packages, as
|
---|
| 10 | * available from https://www.virtualbox.org.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or
|
---|
| 13 | * modify it under the terms of the GNU General Public License
|
---|
| 14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | * License.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful, but
|
---|
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | * General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | *
|
---|
| 25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[34401] | 26 | */
|
---|
| 27 |
|
---|
| 28 | /* VBox includes */
|
---|
| 29 | #include "UIDesktopServices.h"
|
---|
| 30 | #include "UIDesktopServices_darwin_p.h"
|
---|
| 31 | #include "VBoxUtils-darwin.h"
|
---|
| 32 |
|
---|
| 33 | /* Qt includes */
|
---|
| 34 | #include <QString>
|
---|
| 35 |
|
---|
[74942] | 36 | bool UIDesktopServices::createMachineShortcut(const QString &strSrcFile, const QString &strDstPath, const QString &strName, const QUuid &uUuid)
|
---|
[34401] | 37 | {
|
---|
| 38 | return ::darwinCreateMachineShortcut(::darwinToNativeString(strSrcFile.toUtf8().constData()),
|
---|
| 39 | ::darwinToNativeString(strDstPath.toUtf8().constData()),
|
---|
| 40 | ::darwinToNativeString(strName.toUtf8().constData()),
|
---|
[74942] | 41 | ::darwinToNativeString(uUuid.toString().toUtf8().constData()));
|
---|
[34401] | 42 | }
|
---|
| 43 |
|
---|
| 44 | bool UIDesktopServices::openInFileManager(const QString &strFile)
|
---|
| 45 | {
|
---|
| 46 | return ::darwinOpenInFileManager(::darwinToNativeString(strFile.toUtf8().constData()));
|
---|
| 47 | }
|
---|
| 48 |
|
---|