summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qsettings.cpp
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2014-03-28 22:52:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 12:12:21 +0200
commit35a11d6fce6820fa71db7c8b696d25b5de508277 (patch)
tree0d254cc9d6ef702056a1d36c21cec03a80a41be4 /src/corelib/io/qsettings.cpp
parent0c7241ccf2592617b602873aae5f3113ed548215 (diff)
OS X QSettings auto test/writing check update
This patch aims to provide an updated test that follows changes started in 10.7: new rule is that only root can access SystemScope settings. It also disables the sync() workaround code path which is at least not executed during the tst_QSettings execution and returns wrong value to the test. From Apple's documentation: "Note that modification of some preferences domains (those not belonging to the “Current User”) requires root privileges (or Admin privileges prior to OS X v10.6)—see Authorization Services Programming Guide for information on how to gain suitable privileges" https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFPreferencesUtils/Reference/reference.html [ChangeLog][QtCore][QSettings] QSettings now returns the correct value for isWritable() when using SystemScope settings. Task-number: QTBUG-9824 Task-number: QTBUG-21062 Task-number: QTBUG-22745 Change-Id: Ib6a1490ec596b99d189ec4de9a0f28ecfd684172 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/corelib/io/qsettings.cpp')
-rw-r--r--src/corelib/io/qsettings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 0406aeb501..321525ca18 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2496,6 +2496,12 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\snippet code/src_corelib_io_qsettings.cpp 7
+ \li On Mac OS X, permissions to access settings not belonging to the
+ current user (i.e. SystemScope) have changed with 10.7 (Lion). Prior to
+ that version, users having admin rights could access these. For 10.7 and
+ 10.8 (Mountain Lion), only root can. However, 10.9 (Mavericks) changes
+ that rule again but only for the native format (plist files).
+
\li On Unix and Mac OS X systems, the advisory file locking is disabled
if NFS (or AutoFS or CacheFS) is detected to work around a bug in the
NFS fcntl() implementation, which hangs forever if statd or lockd aren't