summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/doc_src_mac-differences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/code/doc_src_mac-differences.cpp')
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/doc/src/snippets/code/doc_src_mac-differences.cpp b/doc/src/snippets/code/doc_src_mac-differences.cpp
index 334f21f9..97646f77 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]