Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#include "qcoreapplication.h"
5#include "private/qcoreapplication_p.h"
6#include <private/qcore_mac_p.h>
7
9
10/*****************************************************************************
11 QCoreApplication utility functions
12 *****************************************************************************/
14{
15 static QString appFileName;
16 if (appFileName.isEmpty()) {
17 QCFType<CFURLRef> bundleURL(CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
18 if (bundleURL) {
19 QCFString cfPath(CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle));
20 if (cfPath)
21 appFileName = cfPath;
22 }
23 }
24 return appFileName;
25}
26
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE QString qAppFileName()