Go to file
Olivier Goffart 8d15068911 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>
2014-07-24 18:50:40 +02:00
bin syncqt: Fix regexp capturing class names of partial specialisation 2014-07-08 16:12:44 +02:00
config.tests Update bundled HarfBuzz-NG copy to 0.9.32 2014-07-20 01:12:24 +02:00
dist Tidy up and expand QSharedPointer documentation. 2014-07-03 10:57:40 +02:00
doc Doc: Add Qt 5 URL in qtbase/doc/global 2014-07-04 12:05:01 +02:00
examples Examples: Add Q_DECL_OVERRIDE to overridden functions 2014-07-15 08:44:44 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Introduce qmake feature use_gold_linker 2014-07-23 16:50:08 +02:00
qmake get rid of pointless MSVC security warnings 2014-07-24 17:37:15 +02:00
src QSettings: use QSaveFile and QLockFile to write the settings 2014-07-24 18:50:40 +02:00
tests QSettings: use QSaveFile and QLockFile to write the settings 2014-07-24 18:50:40 +02:00
tools Introduce qmake feature use_gold_linker 2014-07-23 16:50:08 +02:00
util Mark all QChar static functions as [[gnu::const]] 2014-07-07 03:51:43 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Add .dylib and .d to .gitignore 2014-03-29 00:40:46 +01:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Introduce qmake feature use_gold_linker 2014-07-23 16:50:08 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL Doc: Update links in INSTALL file 2014-01-16 20:37:25 +01:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in LICENSE.LGPL 2014-03-31 12:36:33 +02:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro untangle use of system vs. shell path(-list) semantics 2014-04-30 16:56:54 +02:00
sync.profile Add public and QPA APIs for adapting existing OpenGL contexts 2014-04-24 09:10:29 +02:00