Get "/Library/Application Support" folder path in Mac OS X 10.7 using Qt 4.7.4
-
How to retrieve "Library/Application Support" folder using standard Qt means?
"/Library/Application Support" - global level
"/System/Library/Application Support" - system level
"/Users/<user>/Library/Application Support" - user level
I want to get 1) - the global level folder path.
QDesktopServices::storageLocation( QDesktopServices::DataLocation ) returns 3).
QSettings class digs into "/Library/Preferences".
Any idea how to get "/Library/Application Support" using Qt means?
I don't want to hardcode the folder path. -
You can grab the sources of QDesktopServices::storageLocation in src/gui/util/qdesktopservices_mac.cpp and adapt for your needs. You wil bascially just need to replace kUserDomain (for #3) with kOnSystemDisk (for #1) or kSystemDomain (for #2 - but without "Application Support"!)
Qt does not provide some builtin means for retrieving another path than #3.
-
I know nothing about programming but had a simple question some of you maybe able to answer. In my old version of OSX (10.6) users/user/library/application support used to show up on the left side bar of the finder but now I've upgraded to OSX 10.7.4 none of those folders are showing & a search for them in the finder doesn't show them either. Is this normal for 10.7.4 or is there something wrong with my version?
Thanks.
-
Your OSX is just fine, Apple just decided that users don't need to see the folder. Press left Alt and it will appear in the "go to" menu of the Finder.
There is also a command line option to make it permanantly visible"http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/":http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/