summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_mac-differences.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/code/doc_src_mac-differences.qdoc')
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.qdoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_mac-differences.qdoc b/doc/src/snippets/code/doc_src_mac-differences.qdoc
new file mode 100644
index 0000000..a4d9578
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.qdoc
@@ -0,0 +1,36 @@
+//! [0]
+QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
+//! [0]
+
+
+//! [1]
+#ifdef Q_WS_MAC
+ CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef,
+ kCFURLPOSIXPathStyle);
+ const char *pathPtr = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ qDebug("Path = %s", pathPtr);
+ CFRelease(appUrlRef);
+ CFRelease(macPath);
+#endif
+//! [1]
+
+
+//! [2]
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LprojCompatibleVersion</key>
+ <string>123</string>
+ <key>LprojLocale</key>
+ <string>no</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>123</string>
+</dict>
+</plist>
+//! [2]