diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/platforms/macos.qdoc | 8 | ||||
-rw-r--r-- | doc/src/snippets/code/doc_src_mac-differences.cpp | 10 |
2 files changed, 4 insertions, 14 deletions
diff --git a/doc/src/platforms/macos.qdoc b/doc/src/platforms/macos.qdoc index d975f11d4..2aefe2a18 100644 --- a/doc/src/platforms/macos.qdoc +++ b/doc/src/platforms/macos.qdoc @@ -610,12 +610,8 @@ \snippet snippets/code/doc_src_mac-differences.cpp 1 - \note When \macos is set to use Japanese, a bug causes this sequence - to fail and return an empty string. Therefore, always test the - returned string. - - For more information about using the CFBundle API, visit - \l{http://developer.apple.com/documentation/CoreFoundation/Reference/CFBundleRef/index.html} + For more information about using the NSBundle API, visit + \l{https://developer.apple.com/documentation/foundation/nsbundle?language=objc} {Apple's Developer Website}. QCoreApplication::applicationDirPath() can be used to determine diff --git a/doc/src/snippets/code/doc_src_mac-differences.cpp b/doc/src/snippets/code/doc_src_mac-differences.cpp index 334f21f9b..97646f778 100644 --- a/doc/src/snippets/code/doc_src_mac-differences.cpp +++ b/doc/src/snippets/code/doc_src_mac-differences.cpp @@ -3,13 +3,7 @@ //! [1] #ifdef Q_OS_MAC - CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, - kCFURLPOSIXPathStyle); - const char *pathPtr = CFStringGetCStringPtr(macPath, - CFStringGetSystemEncoding()); - qDebug("Path = %s", pathPtr); - CFRelease(appUrlRef); - CFRelease(macPath); + QString bundlePath = QString::fromNSString(NSBundle.mainBundle.bundlePath); + qDebug() << "Bundle path =" << bundlePath; #endif //! [1] |