Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcoreapplication_mac.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qcoreapplication.h"
6
#
include
"private/qcoreapplication_p.h"
7
#
include
<
private
/
qcore_mac_p
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
/*****************************************************************************
12
QCoreApplication utility functions
13
*****************************************************************************/
14
QString qAppFileName()
15
{
16
// QCoreApplication::applicationFilePath() expects a canonical path
17
static
QString appFileName;
18
if
(appFileName.isEmpty()) {
19
QCFType<CFURLRef> bundleURL(CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
20
if
(bundleURL) {
21
QCFString cfPath(CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle));
22
if
(cfPath)
23
appFileName = cfPath;
24
}
25
}
26
return
appFileName;
27
}
28
29
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtbase
src
corelib
kernel
qcoreapplication_mac.cpp
Generated on
for Qt by
1.16.1