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.
This commit is contained in:
Christian Kamm 2015-05-08 14:02:44 +02:00
parent b9eafaaf24
commit e1c370a9a2

View File

@ -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 ));