[Pkg-owncloud-commits] [owncloud-client] 21/175: Fix startup hang by removing QSettings lock file. #3175

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit e1c370a9a2eb040ae031cc84703a2388ca3736a9
Author: Christian Kamm <kamm at incasoftware.de>
Date:   Fri May 8 14:02:44 2015 +0200

    Fix startup hang by removing QSettings lock file. #3175
    
    In some situations the .lock file would stay around and
    cause subsequent starts of the client to get stuck before
    showing the ui.
---
 src/gui/application.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 2ed510c..911fe7e 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -110,6 +110,13 @@ Application::Application(int &argc, char **argv) :
     if (isRunning())
         return;
 
+    // Workaround for QTBUG-44576: Make sure a stale QSettings lock file
+    // is deleted.
+    {
+        QString lockFilePath = ConfigFile().configFile() + QLatin1String(".lock");
+        QLockFile(lockFilePath).removeStaleLockFile();
+    }
+
 #if defined(WITH_CRASHREPORTER)
     if (ConfigFile().crashReporter())
         _crashHandler.reset(new CrashReporter::Handler( QDir::tempPath(), true, CRASHREPORTER_EXECUTABLE ));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list