forked from qt-creator/qt-creator
QmlProfiler: correctly manage "Application Output" controls
Change-Id: Ief08e953fa38b3eb3d9af8b0e84f793a80931868 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
@@ -708,11 +708,13 @@ void AnalyzerManagerPrivate::addTool(IAnalyzerTool *tool, const StartModes &mode
|
||||
void AnalyzerManagerPrivate::handleToolStarted()
|
||||
{
|
||||
m_isRunning = true; // FIXME: Make less global.
|
||||
updateRunActions();
|
||||
}
|
||||
|
||||
void AnalyzerManagerPrivate::handleToolFinished()
|
||||
{
|
||||
m_isRunning = false;
|
||||
updateRunActions();
|
||||
}
|
||||
|
||||
void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)
|
||||
|
@@ -360,17 +360,17 @@ void QmlProfilerEngine::profilerStateChanged()
|
||||
{
|
||||
switch (d->m_profilerState->currentState()) {
|
||||
case QmlProfilerStateManager::AppReadyToStop : {
|
||||
cancelProcess();
|
||||
if (d->m_runner)
|
||||
cancelProcess();
|
||||
break;
|
||||
}
|
||||
case QmlProfilerStateManager::Idle : {
|
||||
// for some reason the engine is not deleted when it goes to idle
|
||||
// a new one will be created on the next run, and this one will
|
||||
// be only deleted if the new one is running the same app
|
||||
|
||||
// we need to explictly disconnect it here without expecting a deletion
|
||||
// as it will not be run any more, otherwise we will get funny side effects
|
||||
registerProfilerStateManager(0);
|
||||
// When all the profiling is done, delete the profiler runner
|
||||
// (a new one will be created at start)
|
||||
if (d->m_runner) {
|
||||
delete d->m_runner;
|
||||
d->m_runner = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user