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. QSettings is reading cached values even when file doesn't exist?
Forum Updated to NodeBB v4.3 + New Features

QSettings is reading cached values even when file doesn't exist?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    patrickkidd
    wrote on last edited by
    #1

    I am using QSettings to store application preferences in ini format on mac, and am finding that the previously stored values are being read on application startup even after I delete the file in ~/Library/Preferences. Does QSettings cache it's values somewhere else on the system? What's going on here?

    Thanks!

    https://alaskafamilysystems.com/

    1 Reply Last reply
    0
    • siropS Offline
      siropS Offline
      sirop
      wrote on last edited by
      #2

      Well, maybe, this is the answer:

      http://qt-project.org/doc/qt-5/qsettings.html#platform-specific-notes

      To be, or not to be: that is the question:
      Whether ’tis nobler in the mind to suffer
      The slings and arrows of outrageous fortune,
      Or to take arms against a sea of troubles,
      And by opposing end them?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        patrickkidd
        wrote on last edited by
        #3

        I wish it were that simple. According to that document it would either be in ~/Library/Preferences or ~/.config, but I have neither.

        https://alaskafamilysystems.com/

        1 Reply Last reply
        0
        • siropS Offline
          siropS Offline
          sirop
          wrote on last edited by
          #4

          According to http://qt-project.org/doc/qt-5/qsettings.html#setPath
          it can be either:

          UserScope $HOME/.config
          SystemScope /etc/xdg

          To be, or not to be: that is the question:
          Whether ’tis nobler in the mind to suffer
          The slings and arrows of outrageous fortune,
          Or to take arms against a sea of troubles,
          And by opposing end them?

          1 Reply Last reply
          0
          • siropS Offline
            siropS Offline
            sirop
            wrote on last edited by
            #5

            http://qt-project.org/forums/viewthread/34409/#149812

            [quote author="David Stiel" date="1383855373"]Hi,

            In 10.9 the .plist files are being cached ("see":http://hints.macworld.com/article.php?story=20130908042828630.

            So once you have deletede the .plist the cache must be refreshed. Either log out or do "killall -u yourusername cfprefsd"[/quote]

            To be, or not to be: that is the question:
            Whether ’tis nobler in the mind to suffer
            The slings and arrows of outrageous fortune,
            Or to take arms against a sea of troubles,
            And by opposing end them?

            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