QmlProfiler: correctly manage "Application Output" controls

Change-Id: Ief08e953fa38b3eb3d9af8b0e84f793a80931868
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-05-08 13:32:13 +02:00
parent 3e54136629
commit 7f3d93023e
2 changed files with 10 additions and 8 deletions

View File

@@ -708,11 +708,13 @@ void AnalyzerManagerPrivate::addTool(IAnalyzerTool *tool, const StartModes &mode
void AnalyzerManagerPrivate::handleToolStarted() void AnalyzerManagerPrivate::handleToolStarted()
{ {
m_isRunning = true; // FIXME: Make less global. m_isRunning = true; // FIXME: Make less global.
updateRunActions();
} }
void AnalyzerManagerPrivate::handleToolFinished() void AnalyzerManagerPrivate::handleToolFinished()
{ {
m_isRunning = false; m_isRunning = false;
updateRunActions();
} }
void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool) void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)

View File

@@ -360,17 +360,17 @@ void QmlProfilerEngine::profilerStateChanged()
{ {
switch (d->m_profilerState->currentState()) { switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::AppReadyToStop : { case QmlProfilerStateManager::AppReadyToStop : {
cancelProcess(); if (d->m_runner)
cancelProcess();
break; break;
} }
case QmlProfilerStateManager::Idle : { case QmlProfilerStateManager::Idle : {
// for some reason the engine is not deleted when it goes to idle // When all the profiling is done, delete the profiler runner
// a new one will be created on the next run, and this one will // (a new one will be created at start)
// be only deleted if the new one is running the same app if (d->m_runner) {
delete d->m_runner;
// we need to explictly disconnect it here without expecting a deletion d->m_runner = 0;
// as it will not be run any more, otherwise we will get funny side effects }
registerProfilerStateManager(0);
break; break;
} }
default: default: