From 6560c6031f2219bf2da515ef6daa73ec5af854aa Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 30 Dec 2013 15:25:38 +0100 Subject: 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. --- src/core/kconfigini.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/core/kconfigini.cpp') 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(); } -- cgit v1.2.1