diff options
author | David Faure <faure@kde.org> | 2013-12-30 15:25:38 +0100 |
---|---|---|
committer | David Faure <faure@kde.org> | 2013-12-30 15:25:38 +0100 |
commit | 6560c6031f2219bf2da515ef6daa73ec5af854aa (patch) | |
tree | a03a69e3c4cf27c3af627a1ef8745b0e06fc7cde | |
parent | 43d14576bd430968f5ec155323c3395d94753a18 (diff) | |
download | kconfig-6560c6031f2219bf2da515ef6daa73ec5af854aa.tar.gz kconfig-6560c6031f2219bf2da515ef6daa73ec5af854aa.tar.bz2 |
Revert "Workaround corrupted lock files"
This reverts commit c15e319455b7e93439eb445e2e2670ec3122e697.
The real fix is in Qt, let's go back to using lock() here, as intended
by QLockFile.
-rw-r--r-- | src/core/kconfigini.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index 71a8a653..df834f57 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -609,14 +609,7 @@ bool KConfigIniBackend::lock() lockFile = new QLockFile(filePath() + QLatin1String(".lock")); } - // This is a workaround for current QLockFilePrivate::tryLock_sys - // which might crash calling qAppName() if sync() is called after - // the QCoreApplication instance is gone. It might be the case with - // KSharedConfig instances cleanup. - if (!lockFile->tryLock(lockFile->staleLockTime())) { - lockFile->removeStaleLockFile(); - lockFile->lock(); - } + lockFile->lock(); return lockFile->isLocked(); } |