summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-05-28 19:25:17 +0200
committerOlivier Goffart <ogoffart@woboq.com>2014-07-24 18:50:40 +0200
commit8d15068911d7c0ba05732e2796aaa7a90e34a6a1 (patch)
tree8cdb778fb6136f1c20e3b4a2a372b350c2ac9f28 /tests/auto/gui
parentd97624845ac87038413b692a6b256633226ee320 (diff)
QSettings: use QSaveFile and QLockFile to write the settings
The old unix locking code is no longer working on unix since it locks on a file descriptor, but QSaveFile creates a new file, and as a result we get the lock on the wrong file. Also there is no need to keep the lock held only for reading as QSaveFile is atomic. It just needs to be held when doing a read before writing. As a result, since we don't hold the same lock, there could be a race with an application running an older version of Qt if they are writing on the same configuration file. [ChangeLog][QtCore][QSettings] Fixed data loss while writing the config to the disk fails. [ChangeLog][Important behavior changes] The locking mechanism inside QSettings has changed and is no longer compatible with the one of previous versions of Qt. There might be corruption if two applications running different versions of Qt are writing to the same config file at the same time. You must also now have write permissions in the directory containing the settings file in order to write settings Task-number: QTBUG-21739 Change-Id: I0844a5e96c8bc1e1222a3dac6cc48170ca77fe1b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui')
0 files changed, 0 insertions, 0 deletions