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. Getting the value of MAC OSX General settings/preferences.

Getting the value of MAC OSX General settings/preferences.

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 733 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.
  • CarLoowwwwC Offline
    CarLoowwwwC Offline
    CarLoowwww
    wrote on last edited by
    #1

    Is there any way to get the value from the MAC OSX general settings? For example i want to get the settings of how many recent files should appear on my Qt Application?

    1 Reply Last reply
    0
    • CarLoowwwwC Offline
      CarLoowwwwC Offline
      CarLoowwww
      wrote on last edited by
      #2

      Tried to look for the plist of the settings but, the apple.generalsettings.plist is not giving me the data that i want to get.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sandy.martel23
        wrote on last edited by sandy.martel23
        #3
        auto sl = LSSharedFileListCreate( 0, kLSSharedFileListRecentDocumentItems, 0 );
        auto vref = LSSharedFileListCopyProperty( sl, kLSSharedFileListRecentItemsMaxAmount );
        int64_t v = 0;
        if ( CFGetTypeID( vref ) == CFNumberGetTypeID() )
        	CFNumberGetValue( (CFNumberRef)vref, kCFNumberSInt64Type, &v );
        
        

        CFRelease appropriately...

        CarLoowwwwC 1 Reply Last reply
        1
        • S sandy.martel23
          auto sl = LSSharedFileListCreate( 0, kLSSharedFileListRecentDocumentItems, 0 );
          auto vref = LSSharedFileListCopyProperty( sl, kLSSharedFileListRecentItemsMaxAmount );
          int64_t v = 0;
          if ( CFGetTypeID( vref ) == CFNumberGetTypeID() )
          	CFNumberGetValue( (CFNumberRef)vref, kCFNumberSInt64Type, &v );
          
          

          CFRelease appropriately...

          CarLoowwwwC Offline
          CarLoowwwwC Offline
          CarLoowwww
          wrote on last edited by CarLoowwww
          #4

          @sandy.martel23 Thank you. Solved.

          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