Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat(ui): output instructions when user tries to open a second instance
Browse files Browse the repository at this point in the history
Fixes #3483
  • Loading branch information
anthonybilinski committed Sep 14, 2017
1 parent c499597 commit 48d65c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ int main(int argc, char* argv[])
a->addLibraryPath("platforms");

qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
qDebug() << "commit: " << GIT_VERSION << "\n";
qDebug() << "commit: " << GIT_VERSION;


// Check whether we have an update waiting to be installed
Expand Down Expand Up @@ -300,7 +300,12 @@ int main(int argc, char* argv[])
time_t event = ipc.postEvent(eventType, firstParam.toUtf8(), ipcDest);
// If someone else processed it, we're done here, no need to actually start qTox
if (ipc.waitUntilAccepted(event, 2)) {
qDebug() << "Event" << eventType << "was handled by other client.";
if (eventType == "activate") {
qDebug() << "Another qTox instance is already running. If you want to start a second "
"instance, please start with a profile (qtox -p <profile name>).";
} else {
qDebug() << "Event" << eventType << "was handled by other client.";
}
return EXIT_SUCCESS;
}
}
Expand Down

0 comments on commit 48d65c2

Please sign in to comment.