6#ifndef QT_NO_STANDARDPATHS
10#include <private/qcore_mac_p.h>
12#ifndef QT_BOOTSTRAPPED
16#import <Foundation/Foundation.h>
23 NSSearchPathDomainMask
mask)
25 return QString::fromNSString(
26 [NSSearchPathForDirectoriesInDomains(
directory,
mask, YES) lastObject]);
33 return NSDesktopDirectory;
35 return NSDocumentDirectory;
37 return NSApplicationDirectory;
39 return NSMusicDirectory;
41 return NSMoviesDirectory;
43 return NSPicturesDirectory;
48 return NSApplicationSupportDirectory;
51 return NSCachesDirectory;
53 return NSDownloadsDirectory;
55 return NSSharedPublicDirectory;
58 return (NSSearchPathDirectory)0;
64#ifndef QT_BOOTSTRAPPED
70 path += u
'/' + appName;
77 NSSearchPathDomainMask
mask = NSUserDomainMask,
78 bool appendOrgAndApp =
false)
89#if defined(QT_PLATFORM_UIKIT)
128 if (appendOrgAndApp) {
157#if defined(QT_PLATFORM_UIKIT)
166 masks << NSLocalDomainMask;
168 masks << NSSystemDomainMask;
173 if (!
path.isEmpty() && !dirs.contains(
path))
179 CFBundleRef mainBundle = CFBundleGetMainBundle();
181 if (
QCFType<CFURLRef> resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle)) {
182 if (
QCFType<CFURLRef> absoluteResouresURL = CFURLCopyAbsoluteURL(resourcesURL)) {
184 kCFURLPOSIXPathStyle)) {
185 dirs.append(QString::fromCFString(
path));
194 dirs.prepend(localDir);
198#ifndef QT_BOOTSTRAPPED
219 fsPath, kCFURLPOSIXPathStyle,
true)) {
221 CFURLCopyResourcePropertyForKey(
url, kCFURLLocalizedNameKey, &
name, NULL);
222 if (
name && CFStringGetLength(
name))
223 return QString::fromCFString(
name);
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
QString organizationName
the name of the organization that wrote this application
QString applicationName
the name of this application
static QString tempPath()
Returns the absolute canonical path of the system's temporary directory.
static QString homePath()
Returns the absolute path of the user's home directory.
\inmodule QtCore \reentrant
QString fileName() const
Returns the name of the file, excluding the path.
static bool isTestModeEnabled()
static QStringList standardLocations(StandardLocation type)
static QString writableLocation(StandardLocation type)
static QString displayName(StandardLocation type)
StandardLocation
This enum describes the different locations that can be queried using methods such as QStandardPaths:...
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLsizei const GLchar *const * path
static QString baseWritableLocation(QStandardPaths::StandardLocation type, NSSearchPathDomainMask mask=NSUserDomainMask, bool appendOrgAndApp=false)
static NSSearchPathDirectory searchPathDirectory(QStandardPaths::StandardLocation type)
static void appendOrganizationAndApp(QString &path)
static QString pathForDirectory(NSSearchPathDirectory directory, NSSearchPathDomainMask mask)
QUrl url("example.com")
[constructor-url-reference]