Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get "/Library/Application Support" folder path in Mac OS X 10.7 using Qt 4.7.4
QtWS25 Last Chance

Get "/Library/Application Support" folder path in Mac OS X 10.7 using Qt 4.7.4

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 15.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    napajejenunedk0
    wrote on 27 Sept 2011, 09:20 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 27 Sept 2011, 11:01 last edited by
      #2

      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.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dfaure
        wrote on 25 Mar 2012, 10:45 last edited by
        #3

        Qt 5 does. I added QStandardPaths::standardLocations() for exactly this :)

        David Faure (david.faure@kdab.com)
        KDE/Qt Senior Software Engineer
        KDAB - Qt Experts - Platform-independent software solutions

        1 Reply Last reply
        0
        • G Offline
          G Offline
          global001
          wrote on 4 Nov 2012, 14:37 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hardcodes.de
            wrote on 4 Nov 2012, 23:00 last edited by
            #5

            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/

            while(!sleep){++sheep;}

            1 Reply Last reply
            0
            • G Offline
              G Offline
              global001
              wrote on 5 Nov 2012, 00:47 last edited by
              #6

              Thanks heaps hardcodes. I always use Library, glad to have it back! :)

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved