From 2d29dd9b5d30338d0c04a33ed264de5e013b1d2a Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 29 Sep 2014 07:44:59 +0200 Subject: [PATCH] Fixed maybe #61. --- src/miscellaneous/application.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index a82038383..83e093e73 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -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."); } }