Fixed maybe #61.

This commit is contained in:
Martin Rotter 2014-09-29 07:44:59 +02:00
parent c831d4d615
commit 2d29dd9b5d
1 changed files with 6 additions and 3 deletions

View File

@ -162,10 +162,13 @@ void Application::onAboutToQuit() {
// Now, we can check if application should just quit or restart itself.
if (m_shouldRestart) {
// TODO: Disable qtsinglepplication.
// TODO: Start new instance.
finish();
qDebug("Killing local peer connection to allow another instances to start.");
if (QProcess::startDetached(applicationFilePath())) {
finish();
qDebug("New application instance was started.");
}
else {
qWarning("New application instance was not started successfully.");
}
}