Fix lock file

This commit is contained in:
ArsenArsen 2017-12-17 22:06:31 +01:00
parent 413f785375
commit 0c20b0266c
No known key found for this signature in database
GPG Key ID: 683D2F43B0CA4BD2

View File

@ -84,9 +84,9 @@ int main(int argc, char *argv[]) {
a.setApplicationVersion("4.1"); a.setApplicationVersion("4.1");
QLockFile lockFile(QDir::temp().absoluteFilePath("com.arsenarsen.kshare.lock")); QLockFile lockFile(QDir::temp().absoluteFilePath("com.arsenarsen.kshare.lock"));
if(!lockFile.tryLock(100)){ if(!lockFile.tryLock(100))
return 1; return 1;
} else lockFile.lock();
QString locale = QLocale::system().name(); QString locale = QLocale::system().name();
if (locale != "en_US") loadTranslation(locale); if (locale != "en_US") loadTranslation(locale);