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()
|
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)
|
||||||
|
@@ -360,17 +360,17 @@ void QmlProfilerEngine::profilerStateChanged()
|
|||||||
{
|
{
|
||||||
switch (d->m_profilerState->currentState()) {
|
switch (d->m_profilerState->currentState()) {
|
||||||
case QmlProfilerStateManager::AppReadyToStop : {
|
case QmlProfilerStateManager::AppReadyToStop : {
|
||||||
|
if (d->m_runner)
|
||||||
cancelProcess();
|
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:
|
||||||
|
Reference in New Issue
Block a user