summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2015-12-10 11:37:59 +0100
committerAndy Shaw <andy.shaw@theqtcompany.com>2015-12-11 09:41:05 +0000
commit1440c13c8c1ed8eaa99c5d5edbd6fa61fd5eee8b (patch)
tree1685682c31434ff36c3f5e90a8a8d65d933a590d /src
parentfaf4865b8008da895ce587091950e711744df55f (diff)
Check if the file is writable even while QT_BOOTSTRAPPED
QConfFile::isWritable() has the extra effect that it will try and create the path where the file should be if it does not already exist. So this cannot be omitted as 'qmake -set' may be used in a situation where the path does not yet exist. Change-Id: I0113644259f78d090a0687c44cf60d400be9c859 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qsettings.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 413f5693f0..52bcb153ae 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1383,13 +1383,17 @@ void QConfFileSettingsPrivate::syncConfFile(int confFileNo)
Concurrent read and write are not a problem because the writing operation is atomic.
*/
QLockFile lockFile(confFile->name + QLatin1String(".lock"));
+#endif
if (!readOnly) {
- if (!confFile->isWritable() || !lockFile.lock() ) {
+ if (!confFile->isWritable()
+#ifndef QT_BOOTSTRAPPED
+ || !lockFile.lock()
+#endif
+ ) {
setStatus(QSettings::AccessError);
return;
}
}
-#endif
/*
We hold the lock. Let's reread the file if it has changed