1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
novist 2015-02-20 18:17:30 +02:00
parent 9523484bfe
commit 886ee3ff10

View File

@ -172,13 +172,18 @@ int main(int argc, char *argv[])
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }
else if (!ipc.isCurrentOwner() && !parser.isSet("p")) else if (!ipc.isCurrentOwner())
{
uint32_t dest = 0;
if (parser.isSet("p"))
dest = Settings::getInstance().getCurrentProfileId();
time_t event = ipc.postEvent("activate", QByteArray(), dest);
if (ipc.waitUntilProcessed(event, 2) && ipc.isEventAccepted(event))
{ {
time_t event = ipc.postEvent("activate");
ipc.waitUntilProcessed(event);
if (!ipc.isCurrentOwner()) if (!ipc.isCurrentOwner())
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
}
#endif #endif
Nexus::getInstance().start(); Nexus::getInstance().start();