summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2012-05-08 13:32:13 +0200
committerChristiaan Janssen <christiaan.janssen@nokia.com>2012-05-08 17:26:38 +0200
commit7f3d93023e058744cdf25eedefcc344f13352fa5 (patch)
treecc06ff465e7b055be5a4cf8c36731bb27673b8eb /src/plugins
parent3e54136629d4f50e0dada5bce4ed0bc8c7041673 (diff)
downloadqt-creator-7f3d93023e058744cdf25eedefcc344f13352fa5.tar.gz
QmlProfiler: correctly manage "Application Output" controls
Change-Id: Ief08e953fa38b3eb3d9af8b0e84f793a80931868 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/analyzerbase/analyzermanager.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerengine.cpp16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index 29e7533744..7a0ccbb6cc 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -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)
diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
index 5cf2268bf9..f6deeb961b 100644
--- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
@@ -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: