Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21062

QSetting doesn't work properly with SystemScope in Mac OS X Lion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 4.7.3, 5.11
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      There is a problem with QSettings from Qt 4.7.3 that is reproducible only in Mac
      OS X Lion.

      To work with system-wide application settings I write the following:

      QSettings theSettings(QSetting::SystemScope, theCompanyName,
      theApplicationName);

      Normally on Mac these settings are stored in file
      'Library/Preferences/com.CompanyName.ApplicationName.plist'. However starting
      from Mac OS X Lion the file doesn't appear in this place. This is probably
      because starting from Lion there are different default permissions for the
      folder /Library/Preference. In Lion only root have write permission for this
      folder while in previous Mac OS X versions admin users were also able to write
      into this folder. So for me it looks like a bug in QSettings because the way it
      is implemented now the QSettings object is just not usable in case an
      application wants to store system-wide settings in Lion. I think QSettings should not
      put the plist file into this folder starting from Lion, but use some
      other place for the file.

      To reproduce the problem you can use standard Settings Editor Example from the
      Qt package.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            artsiomkast Artem Kostyukovich
            Votes:
            10 Vote for this issue
            Watchers:
            16 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes