1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Remove call to ProfileLocker::clearAllLocks()

The call to ProfileLocker::clearAllLocks() was unnecessary and could remove locks from other programs
This commit is contained in:
Spagy 2015-07-17 15:49:15 +01:00
parent f10b4eaee7
commit 00efbf9e79

View File

@ -25,7 +25,6 @@
#include "src/net/autoupdate.h" #include "src/net/autoupdate.h"
#include "src/persistence/toxsave.h" #include "src/persistence/toxsave.h"
#include "src/persistence/profile.h" #include "src/persistence/profile.h"
#include "src/persistence/profilelocker.h"
#include "src/widget/loginscreen.h" #include "src/widget/loginscreen.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/video/camerasource.h" #include "src/video/camerasource.h"
@ -163,13 +162,6 @@ int main(int argc, char *argv[])
ipc.registerEventHandler("save", &toxSaveEventHandler); ipc.registerEventHandler("save", &toxSaveEventHandler);
ipc.registerEventHandler("activate", &toxActivateEventHandler); ipc.registerEventHandler("activate", &toxActivateEventHandler);
// If we're the IPC owner and we just started, then
// either we're the only running instance or any other instance
// is already so frozen it lost ownership.
// It's safe to remove any potential stale locks in this situation.
if (ipc.isCurrentOwner())
ProfileLocker::clearAllLocks();
if (parser.isSet("p")) if (parser.isSet("p"))
{ {
QString profileName = parser.value("p"); QString profileName = parser.value("p");