From e4494288a1934b45315535921d6823bc4d5be6bf Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Thu, 15 Mar 2012 15:28:48 +0100
Subject: [PATCH] QmlProfiler: Exit if we get an error message

E.g. when we detect that the port is in use, we have to stop the
noDebugOutputTimer.

Change-Id: Idb3f4b91f78c55ab849e55c908e58abf052c3d00
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
---
 src/plugins/qmlprofiler/qmlprofilerengine.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
index 5487711e68d..d16ec2b8406 100644
--- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
@@ -275,6 +275,7 @@ void QmlProfilerEngine::finishProcess()
     if (d->m_running) {
         d->m_running = false;
         d->m_runningTimer.stop();
+        d->m_noDebugOutputTimer.stop();
         if (d->m_runner)
             d->m_runner->stop();
         emit finished();
@@ -305,11 +306,7 @@ void QmlProfilerEngine::wrongSetupMessageBox(const QString &errorMessage)
 
     infoBox->show();
 
-    d->m_running = false;
-    d->m_runningTimer.stop();
-    AnalyzerManager::stopTool();
-    emit finished();
-    emit recordingChanged(d->m_fetchDataFromStart);
+    finishProcess();
 }
 
 void QmlProfilerEngine::wrongSetupMessageBoxFinished(int button)
-- 
GitLab